- Motivation
- How This Repository is Organized
- Get Up and Running
- Running the Tests
- Contributing
- Credits
- License
The Sabia Platform has been developed in order to share technologies built to achieve the needs of the Brazilian semiarid region. The technologies can be registered for free by their creators (researchers from universities, research and innovation institutes, companies and individuals). A set of intermediation services between creators and consumers are available through the platform.
This project codebase is organized in a monorepo using Lerna:
- admin: it contains the project for the frontend of the platform's administrative system (built with React Admin framework).
- api: includes the code for the Rest API of the platform (built with Adonis framework).
- web: contains the code for the platform's website (built with NextJs framework).
You can run this project on your local environment by following the steps below:
-
Clone the project.
git clone [email protected]:ufersa/plataforma-sabia.git
-
Run install command in the root folder so Lerna will handle all packages dependencies
cd plataforma-sabia npm install
-
Follow the instructions included in each one of the packages folders.
P.S.: Alternatively, after setting the environment variables, start both the API and the website server by running
npm run start
from the root foolder. -
Open the source code and start editing!
The site is now running on
http://localhost:8000
. Use your code editor of choice and start editing files. Save your changes, and the browser will update in real time!
You can find additional commands in the package.json file:
start:ci
: starts both the api and web server (useful if you want to run the e2e tests locally).start
: starts both the api and web server in develop mode.lint
: lints the code.test
: runs both the api and web package tests.coverage
: collects code coverage for the api and web package files.test:e2e:run
: starts the environment and runs e2e tests (used on travis config).test:e2e
: runs the e2e tests. It's useful in case you want to run the tests locally (make sure both the api and web server are up).build-coverage
: merges the collected coverage (used on travis config).
You can find information about how to run the unit tests in README files inside each one of the project packages.
This project uses Cypress for running e2e tests. The main purpose is testing the whole application, by simulating the user's behavior.
In order to run Cypress tests, you need to make sure both the API and web server are up (you can use the start:ci
script to achieve this). Once they are both running, run npm run test:e2e
and wait the Cypress GUI pops up and the tests starts. You can also open the GUI and start the tests manually by running npx cypress open
.
Alternatively, you can run npm run test:e2e:run
to run both the api and web server and run the tests in headless mode. Be aware that this script is going to throw an error in case the API or web server are already running.
This project uses a custom Cypress plugin to handle received e-mails, with smtp-tester dependency. All emails should be sent to smtp://localhost:1025
. Therefore, you need to set the SMTP_HOST
and SMTP_PORT
variables in the API .env file so that the emails are catch by Cypress.
When running npm run start:ci
command, the .env-ci
file will be loaded.
We'd love to have your helping hand on sabia-platform
! If you want to contribute to the project, please take a look at the CONTRIBUTING.md file. It explains the whole process and will help you get set up locally.
Thanks goes to these wonderful people (emoji key):
Nichollas Rennah 🎨📖 |
Nícholas André 💻 📖 |
Luiz Cláudio 💻📖 |
Alexandre Ádames 💻 📖 |
Naylson Ferreira 💻 📖 |
Mateus Sampaio 💻 📖 |
marcusmota 💻 📖 |
Lorena Calaça 💻 📖 |
Luiz Felicio 💻 📖 |
Davi de Oliveira 💻 📖 |
João Paulo Moura 🎨 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Our sponsors are shown below! Dou you want to become a sponsor as well? Get in touch!
Sabia Platform is open source software licensed under the MIT License.