Skip to content

Latest commit

 

History

History
116 lines (92 loc) · 3.08 KB

README.md

File metadata and controls

116 lines (92 loc) · 3.08 KB

Introduction

  • A side project I created to learn and improve my skills about how to develop a backend for a micro-saas.

Technologies

FrontEnd & Docs

Features

  • 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 Swagger 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)

Development Setup Local

  1. Clone repository
git clone [email protected]:AlexGalhardo/api.games.alexgalhardo.com.git
  1. Enter repository
cd api.games.alexgalhardo.com/
  1. Install dependencies
npm install
  1. Setup your environment variables
cp .env.example .env
  • Generating JWE Public and Private Keys:
  1. Create Migrations and Seeds
chmod +x setup.sh && ./setup.sh
  1. To Start Prisma Studio:
npm run prisma:studio
  1. Start local server
npm run dev

Build

a. Creating build

npm run build

b. Testing build server locally

npm run start

Tests

a. Run all unit tests

npm run test

Error Logs

API Requests

Documentation

  • Read and add usefull documentation (markdown, notes, images, best practices, etc) about this project inside folder docs/

License

MIT

Copyright (c) August 2023-present, Alex Galhardo