Skip to content

garatortiz/kime-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KIME API

Scalable, typed and monitored NestJS API with PostgreSQL, CI/CD, testing, and observability.

CI Tests codecov

Quality Gate Coverage Bugs Code Smells

Version License Last commit

GitHub Stars Watchers Forks Sentry Enabled


πŸš€ Features

  • βœ… Fully-typed REST API built with NestJS
  • 🐘 PostgreSQL container via Docker
  • βš™οΈ GitHub Actions for CI/CD
  • πŸ§ͺ Unit, E2E & mutation testing (Jest + Stryker)
  • πŸ“Š Code coverage via Codecov
  • πŸ”¬ Code quality enforcement via SonarCloud
  • πŸ“¦ Commit hooks with Lefthook, Commitlint, and Biome
  • 🧠 Error tracking and profiling with Sentry
  • πŸ“š Swagger documentation at /docs/

πŸ“¦ Getting Started

Clone and setup

git clone https://github.com/garatortiz/kime-api.git
cd kime-api
cp .env.example .env
npm install

Run DB with Docker

docker compose up -d

This will start PostgreSQL 15 with user kime_user, password kime_password, and DB kime_db

Run in development mode

npm run start:dev

πŸ§ͺ Testing

# Run all unit and e2e tests
npm test

# Run E2E only
npm run test:e2e

# Watch mode
npm run test:watch

# Coverage
npm run test:cov

# Mutation testing (Stryker)
npm run test:mutation

πŸ› οΈ Tooling & Quality

# Run linter
npm run lint

# Format with Biome
npm run format

# Type check
npm run typecheck

Commit hooks are managed via Lefthook, using Commitlint + Biome.


πŸ“œ API Documentation

Once the app is running, Swagger docs are available at:

πŸ‘‰ http://localhost:3000/docs/

Includes examples for each endpoint and automatic linking between operations.


πŸ“Š Observability (Sentry)

This project is instrumented with @sentry/nestjs + @sentry/profiling-node.

To enable Sentry:

  1. Create a project in Sentry.io
  2. Add your DSN in .env:
SENTRY_DSN=https://your_dsn@o12345.ingest.sentry.io/projectid
  1. Sourcemaps are uploaded via:
npm run build

This runs sentry-cli sourcemaps inject + upload on your /dist folder.


🌐 Deployment

Vercel or any Node-compatible host works. Example:

vercel --prod

Or deploy using Docker:

docker build -t kime-api .
docker run -p 3000:3000 --env-file .env kime-api

πŸ“ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.ts             # Entry point
β”‚   β”œβ”€β”€ instrument.ts       # Sentry instrumentation
β”‚   β”œβ”€β”€ users/              # Users module
β”‚   β”œβ”€β”€ auth/               # Auth module
β”‚   └── filters/            # Global exception filter
β”œβ”€β”€ test/                   # E2E and unit tests
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
└── ...

🀝 Contributing

PRs welcome! Please follow the conventional commit spec (npm run commit) and make sure all checks pass locally:

npm run lint && npm test && npm run typecheck && npm run format

πŸͺͺ License

MIT Β© MatΓ­as Garat Ortiz

About

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy