---
title: How it works
description: 'Learn the architecture of the project'
---
The entire project is built under [NX](https://nx.dev/) to have a monorepo with multiple projects.
Unlike other NX project, this project has one `.env` file that is shared between all the apps.
It makes it easier to develop and deploy the project.
When deploying to websites like [Railway](https://railway.app) or [Heroku](https://heroku.com), you can use a shared environment variables for all the apps.
**At the moment it has 6 project:**
- **Backend** - NestJS based system
- **Workers** - NestJS based workers connected to a Redis Queue.
- **Cron** - NestJS scheduler to run cron jobs.
- **Frontend** - NextJS based control panel.
- **Docs** - Mintlify based documentation website.
## Architecture
### Frontend
The frontend is built with [NextJS](https://nextjs.org/) and [TailwindCSS](https://tailwindcss.com/).
It works directly with the Backend to:
- Show analytics
- Schedule posts
- Manage users
### Backend
The backend is built with [NestJS](https://nestjs.com/) with a basic architecture of controllers, services, repositories and dtos.
It uses [Prisma](https://www.prisma.io/) as an ORM to interact with the database.
By default Prisma uses [Postgres](https://www.postgresql.org/) as a database, but it can be easily changed to any other database since there are no native queries.
It uses Redis to schedule posts and run background jobs.
### Cron
The backend is built with [NestJS](https://nestjs.com/) and share components with the backend.
At the moment the use of the cron is:
- Refresh tokens from different social media platforms.
- Check for trending change every hour and inform users about it.
- Sync the amount of stars for every repository at the end of the day.
### Worker
The backend is built with [NestJS](https://nestjs.com/) and share components with the backend.
At the moment the use of the worker is:
- Post scheduled posts to social media platforms.
- Perform multiple jobs coming from the cron.
### Docs
The documentation website is built with [Mintlify](https://www.mintlify.com/).
The reference in the documentation is being auto-generated by the backend.
NestJS has a built-in Swagger module that generates a JSON file with all the routes and their documentation.
It makes it very easy to track API changes and deploy them.