Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 9 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,18 @@
# Reactome

This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.2.
REACTOME is an open-source, open access, manually curated and peer-reviewed pathway database.

## Development server

To start a local development server, run:

```bash
ng serve
```

Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.

## Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

```bash
ng generate component component-name
```

For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:

```bash
ng generate --help
```

## Building

To build the project run:

```bash
ng build
```

This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.

## Running unit tests

To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:

```bash
ng test
```

## Running end-to-end tests

For end-to-end (e2e) testing, run:
## Local Development Server
To setup a local environment

```bash
ng e2e
npm install --legacy-peer-deps
npm start
```

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
## Usage
Reactome has a wide range of features, to explore more of Reactome or get more information visit [the documentation page](https://reactome.org/documentation) or see the ````/documentation```` folder in the root directory.

## Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
## LICENSE
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
3 changes: 3 additions & 0 deletions documentation/PathwayBrowser/pathway-browser.md
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EliotRagueneau did you have anything specific you would want in these docs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to create a proper user guide for this, never took the time to do it yet :/

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# PathwayBrowser
[Userguide](http://localhost:4200/documentation/userguide/pathway-browser)
Dev docs loading...
10 changes: 10 additions & 0 deletions documentation/WebsiteAngular/adding-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Adding Components to Reactome
## What is a Component
"Components are the main building blocks of Angular applications. Each component represents a part of a larger web page. Organizing an application into components helps provide structure to your project, clearly separating code into specific parts that are easy to maintain and grow over time." - [Angular Docs](https://angular.dev/essentials/components)

## How to Add one
To add a component to this project use the following command
````
ng generate component <Component name and path here>
````
and edit the files it generates to your hearts content. You will then be able to use the component wherever you want in the HTML files.
10 changes: 10 additions & 0 deletions documentation/WebsiteAngular/adding-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Adding a Page to Reactome
The first thing to consider here is whether or not your page needs custom angular functionality. If the pages will be comprised of only text, images and video, a TinaCMS page will suffice and you can follow the TinaCMS tutorial instead.

To create a new angular page follow these steps
1. Generate a new component (this will be your page)
Follow the tutorial in adding-components
2. Add the route for your page in ````projects/website-angular/src/app/app.routes.ts````
Your "route" is what makes your page show up at the correct address in the browser.
3. Edit your page to your hearts content.
This step will require a bit more creativity and Angular experience. I can't be sure what kind of page you are creating so do your best to get the functionality your need with the power of the internet on your side. I believe in you!
32 changes: 32 additions & 0 deletions documentation/WebsiteAngular/changing-styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changing Styles
Hey!!! Are you here because you think my work is ugly?! Not cool.
Jokes aside here is your guide to changing the look of anything on the website.

## SCSS
[SCSS](https://sass-lang.com/) is the framework we use for *styling* (assigning visual traits to HTML tags) in this repository.

## Changing or Adding Styles
For the sake of simplicity I will guide you through a basic tutorial on changing the style of an element which will hopefully be applicable to whatever you are trying to do.

1. Find class you are trying to restyle on the page (or add a *class* to the component)
For this tutorial we will use the copyright text at the bottom of the Reactome page ```` © 2026 Reactome````.
1. Use right click and select *Inspect* on the component you want to change
This will open up the *inspector* menu and allow you to see the base HTML of the page. We can see here that the *class* for the box the the copyright text is in is named ````copyright````.
1. Find the class definition in a SCSS file (or make one)
It would help if you already know the file you're working in but if you don't then use a text-search function to match text or class name until you find the correct file. In this case ````projects/website-angular/src/app/copyright-footer/copyright-footer.component.scss````.
1. Edit the style
Now that we have found the *copyright* class definition we can change it as we see fit. To change the colour of the copyright box. Replace the ````.copyright```` section with this.
````
.copyright {
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 4px;
color: pink;
background-color: pink; #change this line
}
````

Now you have all the skills you need to change styles wherever you like! Go forth and style away.
6 changes: 6 additions & 0 deletions documentation/WebsiteAngular/website-angular.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Website Angular
What can I even say? This document refers to the code in the ````projects/website-angular```` directory. This code handles the majority of UI on the website barring certain special pages such as ````/PathwayBrowser````, ````/chat```` and a few others.

The website is an [angular](https://angular.dev/) project making use of TinaCMS for content management.

For information on adding pages, components or changing styles please check out the other documentation files.
20 changes: 20 additions & 0 deletions documentation/local-environment-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Guide to Running Reactome as a Docker Container
This guide will instruct you in setting up Reactome in a Docker container!

## Step 1: Installing Docker
Docker is a containerization tool that allows you to run environments you may not have installed on your computer. You can install Docker by following these [instructions](https://docs.docker.com/get-started/get-docker/). Check that Docker has installed correctly by running ```docker --version```. If you see a version number, then everything is installed correctly.

## Step 2: Building and Running the Image
Once Docker has been installed, run the following command to prepare the local environment:
```
docker compose up --build
```

## Step 3: Explore Reactome!
Visit [http://localhost:4200/](http://localhost:4200/) to access the website.
You're all done! Good job.

Once finished with accessing the website, run the following command:
```
docker compose down
```
34 changes: 34 additions & 0 deletions documentation/local-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Guide to Setting up Reactome as a local Environment
**Hello and welcome to the local environment installation guide!**
In an effort to minimize the suffering of all who come here after me I will do my best to assume no pre-exsisting knowledge on github or Angular development.

Feel free to skip ahead if you have already completed some of these steps!

## Step 1: Installing git
If you are rolling your eyes at the pedantry of this guide please skip to the next step.

In order to get a local version of Reactome on your computer, you will need to get the code onto your computer. We will be doing this with the command line tool git which you can install for Windows, Linux or MacOS [here](https://git-scm.com/install/).

Once git is installed clone and enter the repository with the following commands:
````
git clone https://github.com/reactome/WebsiteAngular.git
cd WebsiteAngular
````
this will place a local copy of the project onto you computer and open the folder containing it.


## Step 2: Installing Node
Node is the tool that will compile and run the Reactome project. You can download it [here](https://nodejs.org/en/download)!
Once node is installed run the following commands in the ````WebsiteAngular/```` directory.

````
npm install --legacy-peer-deps
npm start
````

After this you should have a fully functional copy of Reactome running on your computer.

If you run into any issues, try your best to follow any instructions in the error message or any advice found online.

# Step 3: Rejoice!
Nothing to do here but reap the benefits of your hard work I guess? Why are you still reading this.
96 changes: 96 additions & 0 deletions documentation/tina-cms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# TinaCMS
TinaCMS is the content management system that Reactome is using for the majority of its pages and all of its articles. This document will instruct you on how to **add**, **edit** and **customize** TinaCMS pages.

### Important!!!
Before making any changes make sure your working git branch is up to date with origin/main. To do this run ````git pull```` or ````git fetch````.

## Adding a new page to Reactome from the Browser
Adding a page to Tina can be done in a few steps
1. **Choose where you are adding the page**
Depending on whether you are adding an *about*, *content*, *documentation*, *tools*, *community*, *news*, *FAQ*, or *research spotlight* page will determine how you proceed.

2. **Start your Reactome local dev environment**
If you followed the ````documentation/local-environment.md```` tutorial run ````npm start````
If you followed the ````documentation/local-environment-docker.md```` tutorial run ````docker compose up --build````

3. **Navigate to /admin**
4. **Go to the collection you would like to add to**
Find the "Navigation Menu" button and click on the *collection* you would like to add to.
5. **Click Add File**
6. **Edit your page / article**
Don't forget to set the DatePublished!

7. **Click Save**
8. **Refresh your local environment**
Stop it with ````^C```` and run again with the command from *Step 2*

Your Page will now appear in your local environment. To publish it view the *publishing to github* portion of this tutorial.

## Editing a TinaCMS page from the Browser
To Edit a pre-existing page in your local dev environment follow the following steps.
1. **Start your Reactome local dev environment**
If you followed the ````documentation/local-environment.md```` tutorial run ````npm start````
If you followed the ````documentation/local-environment-docker.md```` tutorial run ````docker compose up --build````
2. **Navigate to /admin**
3. **Go to the collection you would like to edit from**
Find the "Navigation Menu" button and click on the *collection* that the article you would like to edit is in.
4. **Find your chosen article**
5. **Click on the ... menu and select Edit in Admin**
6. **Edit your page / article**
7. **Click Save**

8. **Refresh your local environment**
Stop it with ````^C```` and run again with the command from *Step 1*

Your edited page will now appear in your local environment. To publish your changes, view the *publishing to github* portion of this tutorial.

## Adding and Editing Pages Through mdx files
If you would prefer to use your own .md or .mdx file editor or do not wish to use a local dev environment -- you can instead edit the files directly.

All articles and pages are stored in the ````projects/website-angular/content```` directory of this repository. Simply find the collection relevant to your page (i.e ````about/news```` for News articles) and add or edit the relevant files as you see fit.

If you are adding net new files please follow these templates.
For articles ````about/news````, ````content/reactome-research-spotlight```` or ````documentation/faq````:
````
---
title: <Title Here>
date: <YYYY-MM-DD>
author: <Author Here>
tags:
- tag
image: /uploads/<upload path here>
---

<Article Body Here>
````
For all other types of pages:
````
---
title: <Title Here>
description: <Description Here>
category: <about, content, documentation, tools, community, download>
image: /uploads/<upload path here>
---

<Body Here>
````


## Publishing to Github
Once you are happy with your changes its time to publish them to github for review. This will require a github account so make sure you have one [here](https://github.com/login).
Once you are ready run these commands from your clone of the repository.
````
git status
git switch -c <Your Article/Branch Name Here>
git add .
git commit -m "<Your Commit Message Here>"
git push -u origin <Your Article/Branch Name Here>
````
Your branch is now available on the remote repository where you can make a pull request and have your article reviewed. Once everything has been approved the pull request (PR) can be merged into the working branch from which it can be put into the next release.

If you are uncomfortable with command line there are convenient tools like the [VScode extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions) or [Github Desktop](https://www.gitkraken.com/download?_gl=1*u0whzn*_up*MQ..*_gs*MQ..&gclid=CjwKCAjwhLPOBhBiEiwA8_wJHPBQZEe_3tLOunlEc4lXI8wM8Wxgpov5AYK6cOdTyhM8m1IfV02dCRoCaXgQAvD_BwE) that can make things easier.

## Other Notes on TinaCMS
- If you ever have to edit the collections or general setup of TinaCMS that can be done in ````projects/website-angular/tina/config.ts````
- If you need to make a home / landing page for a collection (i.e *about/*, *content/*) just name the file ````index.mdx```` and place it in the correct folder
- Additional Information about TinaCMS can be found [here](https://tina.io/)
Loading