Skip to content

Latest commit

 

History

History

README.md

Akomo Logo

A progressive Node.js framework backend for Akomo, tracking builds and exchange rates with precision.

Description

Akomo Backend is built with NestJS, utilizing Prisma ORM and Neon Postgres for high-performance, serverless data management.

Infrastructure: Supabase to Neon Migration

We have recently migrated our data layer from Supabase to Neon Postgres using Prisma 7.

Key Changes

  • Database: Neon (Serverless Postgres)
  • ORM: Prisma 7 with Neon Adapter
  • Architecture: Moved from direct Supabase client to a centralized PrismaService with global dependency injection.

Project setup

$ pnpm install

Environment Variables

Create a .env file in the root directory:

DATABASE_URL=postgresql://user:password@host/db?sslmode=require
PORT=3000

Important

Ensure your DATABASE_URL is a valid Neon connection string. For Prisma migrations and db push, it is recommended to use the Direct Connection URL from the Neon console.

Database Management

We use Prisma for schema management and migrations.

# Sync database with schema (Recommended for Dev/Neon)
$ npx prisma db push

# Generate Prisma Client
$ npx prisma generate

# Open Prisma Studio to view data
$ npx prisma studio

Compile and run the project

# development
$ pnpm start

# watch mode (Includes automatic port cleanup on port 3000)
$ pnpm start:dev

# production mode
$ pnpm start:prod

Scripts & Sync

The backend includes utility scripts for data synchronization:

# Sync exchange rates from Binance
$ pnpm sync:binance

# Sync exchange rates from BCV
$ pnpm sync:bcv

API Documentation

Swagger UI is available for API exploration:

  • Local: http://localhost:3000/api/docs

License

Akomo is MIT licensed.