Drites is a small community publishing application for Markdown posts. Readers can browse articles and profiles; signed-in writers can publish, like, bookmark, comment, and manage their own posts. Next.js owns the web and server layers, Better Auth owns email-and-password identity, and PostgreSQL stores application and session data through Prisma.
The application is deployed as a Docker Compose workload on the personal Coolify instance at https://drites.sdey.me. See the Coolify runbook.
- Next.js 16 and React 19 with TypeScript
- Tailwind CSS 4 with shadcn/ui-compatible primitives
- Better Auth 1.7 with email-and-password authentication
- Prisma 7 with PostgreSQL and the
pgdriver adapter - pnpm 11 on Node.js 24
Use Node.js 24, Corepack, Docker, and Docker Compose.
corepack enable
pnpm install --frozen-lockfile
cp example.env .env
docker compose up -d db
pnpm db:deploy
pnpm devOpen http://localhost:3000. The initial migration creates the local schema. Use prisma migrate dev only when intentionally changing that schema; never use db push against a hosted database.
| Variable | Purpose |
|---|---|
BETTER_AUTH_SECRET |
Server-only session and credential secret, 32+ characters |
DATABASE_URL |
TLS PostgreSQL connection used by Prisma |
APP_URL |
Canonical public origin, without a trailing slash |
Copy example.env to an ignored .env file. Never commit populated environment files or credentials.
pnpm dev # local development
pnpm build # production build
pnpm start # production server on port 3000
pnpm lint # ESLint
pnpm typecheck # TypeScript
pnpm format:check # Prettier
pnpm db:migrate # create/apply a development migration
pnpm db:deploy # apply committed migrationsProduction packaging lives in Dockerfile and docker-compose.coolify.yaml. The existing docker-compose.yaml remains a local PostgreSQL helper.
There is no automated test suite yet. The required manual product pass is documented in local development.