- Introduction
- Environment
- Branching Strategy
- Pull Request Workflow
- Build, Release, and Deploy Workflow
- Reverting a Release
- Code Quality Guidelines
- Getting Started Developing
- Testing
- Troubleshooting
- FAQ
- Contact
- Database Setup
- API Documentation
- Logs and Monitoring
- Rollback Procedures
- Continuous Integration and Continuous Deployment
- Acknowledgements
This repository contains the codebase for the Urapolku project. It includes a React/Vite frontend and a Node.js backend. This README serves as a guide for developers to understand the project structure and workflow.
We maintain three environments:
- Production: The live application accessible to users.
- Staging: A replica of the Production environment for testing purposes.
- Development: The active development branch.
- Create a new branch for each new feature using the naming convention:
Dev-Feature-Name
. - Merge feature branches into the
Development
branch. - When ready, merge
Development
intoStaging
for further testing. - After approval on
Staging
, merge intoProduction
.
- Create a pull request (PR).
- A workflow will be triggered to check for code quality, linting, and security.
- PR should be reviewed by the CTO.
- Once reviewed and passed, the PR will be merged.
- Upon merging a PR towards the Staging Branch, a new workflow is triggered:
Build, Release, and Deploy
. - This workflow creates a Docker image and zip, tar.gz archive files as artifacts.
- Docker images are pushed to a private Docker Hub repository.
- The images are automatically deployed to a Digital Ocean droplet to create a Staging server.
- After verification, a snapshot is made for backup purposes.
- After the environment is deployed, there will be a testing environment available to check whether the Staging branch works correctly.
A "Killswitch" button is available on GitHub to revert to a previous release in case of an emergency in Production.
Follow the Quality, Security, and Styling Assurance Guidelines.
Navigate to the frontend
directory and run the following commands:
npm install
Go to the Discord server for Urapolku that you are invited to, and copy the correct environemt variables for the development branch for the frontend into a .env file within the frontend directory Afterwards, run the following commands:
npm run dev
You should now be ready to start working on the frontend code.
Navigate to the backend directory and run the following commands:
npm install
Go to the Discord server for Urapolku that you are invited to, and copy the correct environment variables for the development branch for the backend into a .env file within the backend directory Afterwards, run the following commands:
npm run dev
At some point we will have unit tests for our frontend and backend. These tests should be written by developers to make sure that components that are made inside of these projects keep working like they should.
We are going to create a test script inside the package.json for each project. You should be able to run the command:
npm run test
In order to execute the unit tests.
If you encounter any issues during the setup or development process, please refer to the following resources:
FAQ section (coming soon) Discord support channels Issue Tracker on GitHub
- Q: Where do I find the environment variables? A: Refer to the #environment-variables channel on Discord.
For any additional questions or feedback, please contact:
- Chief Technology Officer (CTO) - Simbaclaws on Discord
- Product Manager - AdemOttoman on Discord
The frontend doesn't directly interact with the database, but it's crucial to ensure that environment variables related to API endpoints are correctly set. Refer to the #environment-variables
channel on Discord for more details.
Before running the backend server, ensure your database connection strings and related environment variables are set up correctly. Refer to the #environment-variables
channel on Discord for configuration details.
We maintain a separate API documentation that you can find here. This documentation covers all the API endpoints, request/response types, and statuses.
Logs for the staging and production environments are stored in [LOG_STORAGE_SERVICE]. To access these logs, please contact the CTO or project manager.
For guidelines on how to rollback features or database changes, consult our Rollback Procedures Documentation.
We utilize GitHub Actions for our CI/CD pipelines. For more details, check the .github/workflows
directory in this repository.
Special thanks to all contributors and team members who have been a part of this project!