- Framework: Next.js 16 (App Router)
- Runtime: React 19, TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth with Keycloak OAuth
- UI: Tailwind CSS, Radix UI, shadcn/ui
- Monitoring: Sentry
- i18n: i18next
- Package Manager: Bun
- Code Quality: Biome (linting/formatting), Knip (unused dependency checker)
- Node.js >= 20.10.0
- Bun
- PostgreSQL 17+
- Docker & Docker Compose (for Keycloak)
Key configuration files:
knip.json- Unused dependency/file checker configurationbiome.jsonc- Linter and formatter configurationnext.config.ts- Next.js configurationtsconfig.json- TypeScript configurationpostcss.config.mjs- PostCSS configuration
git clone https://github.com/allthingslinux/portal
cd portal
bun installConfigure required environment variables. See src/core/config/app.config.ts and src/core/config/auth.config.ts for required values.
Required:
NEXT_PUBLIC_PRODUCT_NAMENEXT_PUBLIC_SITE_TITLENEXT_PUBLIC_SITE_DESCRIPTIONNEXT_PUBLIC_SITE_URLNEXT_PUBLIC_DEFAULT_LOCALENEXT_PUBLIC_DEFAULT_THEME_MODENEXT_PUBLIC_THEME_COLORNEXT_PUBLIC_THEME_COLOR_DARKKEYCLOAK_IDKEYCLOAK_SECRETKEYCLOAK_ISSUER- Database connection string
docker compose up -dThis starts PostgreSQL and Keycloak instances.
bun run db:setupThis runs migrations and seeds the database.
bun run devbun run dev- Start development serverbun run build- Production buildbun run start- Start production serverbun run clean- Clean build artifacts and node_modules
bun run lint- Run linter (Ultracite)bun run lint:fix- Fix linting issuesbun run typecheck- TypeScript type checkingbun run knip- Find unused dependencies, exports, and files
bun run db:migrate- Run database migrationsbun run db:seed- Seed databasebun run db:setup- Migrate and seedbun run db:studio- Open Drizzle Studiobun run db:create-better-auth-tables- Create Better Auth tablesbun run db:push- Push schema changes to databasebun run db:generate- Generate migration files
bun run analyze- Bundle analyzer for production build
src/
├── app/ # Next.js App Router pages
├── core/ # Core configuration and infrastructure
│ ├── auth/ # Better Auth setup
│ ├── config/ # App and auth configuration
│ ├── database/ # Drizzle schema and migrations
│ ├── email/ # Email templates and mailers
│ ├── i18n/ # Internationalization
│ └── monitoring/ # Analytics and Sentry
├── features/ # Feature modules
│ ├── accounts/ # Account management
│ ├── admin/ # Admin features
│ ├── auth/ # Authentication UI
│ ├── cms/ # CMS integration (Keystatic)
│ ├── notifications/# Notification system
│ └── team-accounts/# Team account features
└── shared/ # Shared components and utilities
This project uses several tools to maintain code quality:
- Biome: Fast linter and formatter for JavaScript/TypeScript
- Knip: Finds unused dependencies, exports, and files
- TypeScript: Static type checking
Run all quality checks:
bun run lint && bun run typecheck && bun run knipUse Knip to identify unused dependencies, exports, and files:
# Check all files (development mode)
bun run knip
# Check only production code
bun run knip --production
# Auto-fix unused exports and dependencies
bun run knip --fixBefore committing:
- Run all quality checks:
bun run lint && bun run typecheck && bun run knip - Format code:
bun run lint:fix
When making schema changes:
- Update schema in
src/core/database/schema.ts - Generate migration:
bun run db:generate - Apply migration:
bun run db:migrate
See LICENSE file.