Skip to content

ufersa/plataforma-sabia

Repository files navigation

Sabia Platform

Sabiá Platform

🐦 🌴 🚀

The Technologies Platform from the Brazilian Semiarid.

Sabia Platform is released under the MIT license. Code coverage

Table of Contents

Motivation

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.

📁 How This Repository is Organized

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).

🚀 Get Up and Running

You can run this project on your local environment by following the steps below:

  1. Clone the project.

      git clone [email protected]:ufersa/plataforma-sabia.git
  2. Run install command in the root folder so Lerna will handle all packages dependencies

      cd plataforma-sabia
      npm install
  3. 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.

  4. 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!

Additional commands

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).

🧪 Running the Tests

Unit Tests

You can find information about how to run the unit tests in README files inside each one of the project packages.

E2E Tests

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.

🤝 Contributing

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.

Credits

Contributors ✨

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!

Sponsors

Our sponsors are shown below! Dou you want to become a sponsor as well? Get in touch!

Mdr logo Mdr logo

📝 License

Sabia Platform is open source software licensed under the MIT License.

About

🐦 A Plataforma de Tecnologias do Semi-Árido Brasileiro 🌴

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages