- A side project I created to learn and improve my skills about how to develop a backend for a micro-saas.
- FrontEnd Source Code: https://github.com/AlexGalhardo/games.alexgalhardo.com
- Documentation Source code: https://github.com/AlexGalhardo/docs.games.alexgalhardo.com
- Docs Live: https://docs.games.alexgalhardo.com
- Legacy v1: https://github.com/AlexGalhardo/legacy.api.nerdapi.com
- CRUD API REST
- Authentication (Email & Password, Google & Github)
- Send Emails
- Subscriptions Payments with Webhooks
- Unit Tests using Jest Mocks
- Git Hooks using Husky (pre-commit and pre-push)
- Following clean architecture principles (use-case, repositories, dependency injection, IoC, etc)
- CI/CD using Github Actions (linter, tests, build)
- Middlewares to verify authentication & authorization
- Migrations & Seeds & Database GUI
- OpenAPI Specification v3 Documentation
- Multi tenant (single database, shared schema)
- Logs & Monitoring
- Zod validation for payload requests
- Security configs (rate-limiter, cors, exception errors handlers, etc)
- Git tags for releases
- Integration tests
- Healthcheck endpoint (databases conections, memory usage, etc)
- Clone repository
git clone git@github.com:AlexGalhardo/api.games.alexgalhardo.com.git
- Enter repository
cd api.games.alexgalhardo.com/
- Install dependencies
npm install
- Setup your environment variables
cp .env.example .env
- Create Migrations and Seeds
chmod +x setup.sh && ./setup.sh
- To Start Prisma Studio:
npm run prisma:studio
- Start local server
npm run dev
a. Creating build
npm run build
b. Testing build server locally
npm run start
a. Run all unit tests
npm run test
- You can see the HTTP Requests references inside folder rest-client/
- You can also see API documentation in:
- Localhost: http://localhost:3000/docs
- Live: https://api.games.alexgalhardo.com/docs
- Read and add usefull documentation (markdown, notes, images, best practices, etc) about this project inside folder docs/
Copyright (c) August 2023-present, Alex Galhardo