Small CRM for small business. This is a "learning project", made with NextJS. The database is with Postgresql.
- Docker or Podman, with compose
- NextJS 15
- PostgreSQL 17
- Prisma
- Generate a JWT secret
openssl rand -hex 64
- Save it to
.env.local
JWT_SECRET=[my secret]
- Start the development server
make dev
- modify
prisma/schema.prisma
- run
make migration
NEXT_PUBLIC_REGISTER_ENABLED=true
This software is best run with the Docker Infra.
You can use this sample docker-compose.yml
services:
app:
restart: unless-stopped
image: ghcr.io/sirber/tiny-crm:latest
depends_on:
- db
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://postgres:crm@db:5432/tiny-crm?connection_limit=10
- NODE_ENV=production
- JWT_SECRET=[my secret]
- NEXT_PUBLIC_REGISTER_ENABLED=false
db:
image: postgres:17-alpine
restart: unless-stopped
command: -c 'max_connections=1000'
environment:
- POSTGRES_PASSWORD=crm
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
To run elsewhere, you can use the image directly and configure using environment variables:
NEXT_PUBLIC_REGISTER_ENABLED=true
DATABASE_URL=postgresql://[user:pass]@[db-name]:5432/[schema]?connection_limit=10
JWT_SECRET=[my secret]