Skip to content

codebuilderinc/codebuilder-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codebuilder Frontend

Deploy Production Docker Container

Next.js frontend for Codebuilder.

Environment Files

  • pnpm dev (Next.js dev server) loads environment variables in this order:
    • .env.local (preferred for local-only overrides)
    • .env
  • Docker Compose loads .env because docker-compose.yml explicitly uses env_file: ./.env.

Important: inside Docker, Postgres must be reached via db:5432 (service name + container port), not localhost.

Commands

Run any command as:

pnpm <command>

List all available commands:

pnpm run

Core

pnpm dev
pnpm build
pnpm build:static
pnpm start
pnpm lint
  • dev: Start Next.js dev server (Turbopack).
  • build: Production build.
  • build:static: Static export build (only if export mode is supported).
  • start: Run production server from .next build output.
  • lint: Run linting.

Local DB (for development)

pnpm dev:db:start
pnpm dev:db:stop
pnpm dev:db:prepare
  • dev:db:start: Start the local Postgres container using docker-compose.local.yml.
  • dev:db:stop: Stop/remove the local Postgres container.
  • dev:db:prepare: Create the Prisma shadow database inside Postgres (safe to re-run).

Prisma

pnpm prisma:migrate
pnpm prisma:generate
pnpm prisma:studio
  • prisma:migrate: Run Prisma migrations in development mode.
  • prisma:generate: Regenerate Prisma client.
  • prisma:studio: Launch Prisma Studio.

Docker (Production / Server)

pnpm prod:up
pnpm prod:down
pnpm prod:logs
pnpm prod:reset
  • prod:up: Rebuild and redeploy the Docker Compose stack (frontend + db). This is the main manual deploy command.
  • prod:down: Stop/remove the stack containers and networks (does not delete external volumes unless --volumes is used).
  • prod:logs: Tail logs for the frontend service.
  • prod:reset: WARNING: brings the stack down with --volumes and starts fresh (will wipe DB data).

CI / Deployment

On push to main, the GitHub Actions workflow rebuilds and redeploys the Docker services on the self-hosted runner.

Activity

Alt

About

Revamp of CodeBuilder.org frontend w/ React + Next.JS + TailwindCSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages