A centralized hub and identity management system for the All Things Linux (ATL) community and non-profit. Portal serves as the single source of truth and entry point for all ATL services, enabling users to create one ATL identity that provisions and manages access to services across multiple domains.
Portal provides unified access to:
- Free email services
- IRC and XMPP chat
- SSH pubnix spaces
- Web hosting
- Discord integration
- Wiki access
- Developer tools
- And more...
All services are accessible across multiple domains: atl.dev, atl.sh, atl.tools, atl.chat.
- Framework: React 19 + Next.js 16 (App Router)
- Language: TypeScript (strict mode)
- Styling: TailwindCSS 4 + Shadcn UI (Radix)
- Authentication: BetterAuth
- Database: DrizzleORM + PostgreSQL
- Validation: Zod
- State Management: TanStack Query (React Query)
- Internationalization: next-intl
- Code Quality: Biome + Ultracite
- Node.js >= 22.18.0 (LTS recommended, managed via
miseif available) - pnpm 10.27.0
- PostgreSQL database (PostgreSQL 18 recommended)
- Docker and Docker Compose (for local database setup)
# Install dependencies
pnpm install
# Set up environment variables
# Create a .env file with your configuration
# Required variables include database connection, BetterAuth configuration, etc.
# Start PostgreSQL database (using Docker Compose)
docker compose up -d portal-db
# Run database migrations
pnpm db:migrate
# (Optional) Seed database with sample data
pnpm db:seed
# Create initial admin user
pnpm create-admin# Start development server
pnpm dev
# Alternative development commands:
pnpm dev:turbo # Use Turbopack for faster builds
pnpm dev:https # Run with HTTPS enabled
pnpm scan # Start dev server with React Scan (performance profiling)The application will be available at http://localhost:3000.
pnpm dev- Start development serverpnpm dev:turbo- Start dev server with Turbopackpnpm dev:https- Start dev server with HTTPSpnpm scan- Start dev server with React Scan (performance profiling)pnpm build- Build for productionpnpm build:debug- Build with debug outputpnpm build:profile- Build with profilingpnpm build:prerender-debug- Build with prerender debuggingpnpm start- Start production server
pnpm check- Run linting and type checking (Ultracite)pnpm fix- Auto-fix linting and formatting issuespnpm type-check- Type check without lintingpnpm type-check:full- Full type check with Next.js type generationpnpm typegen- Generate Next.js typespnpm analyze- Analyze bundle sizepnpm analyze:output- Analyze and output bundle reportpnpm deduplicate- Deduplicate dependencies
pnpm db:generate- Generate migration files from schema changespnpm db:migrate- Run database migrationspnpm db:push- Push schema changes directly (dev only, no migrations)pnpm db:studio- Open Drizzle Studio (database GUI)pnpm db:seed- Seed database with sample datapnpm db:seed:reset- Reset and reseed database
pnpm auth:init-schema- Generate BetterAuth database schemapnpm create-admin- Create an admin user
pnpm info- Show Next.js environment informationpnpm upgrade- Upgrade Next.js and dependenciespnpm telemetry:enable- Enable Next.js telemetrypnpm telemetry:disable- Disable Next.js telemetry
src/
├── app/ # Next.js App Router
│ ├── (dashboard)/ # Protected dashboard routes
│ │ └── app/ # Main application routes
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
├── components/ # Reusable React components
│ ├── ui/ # shadcn/ui
│ └── layout/ # Layout components
├── lib/ # Core business logic
│ ├── auth/ # Authentication module
│ ├── db/ # Database configuration
│ ├── api/ # API client utilities
│ ├── config/ # Application configuration
│ ├── email/ # Email configuration
│ ├── routes/ # Route utilities and i18n routes
│ ├── seo/ # SEO utilities
│ └── utils/ # General utilities
├── hooks/ # Custom React hooks
├── i18n/ # Internationalization setup
├── styles/ # Global styles
└── proxy.ts # Development proxy configuration
The project includes a Docker Compose configuration for local PostgreSQL development:
# Start PostgreSQL container
docker compose up -d portal-db
# The database will be available at:
# - Host: localhost
# - Port: 5432
# - User: postgres
# - Password: postgres
# - Database: portalUpdate your .env file with the database connection string:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/portalThe project uses TypeScript path aliases for clean imports:
import { auth, authClient } from "@/auth"; // Authentication
import { db } from "@/db"; // Database
import { Button } from "@/components/ui/button"; // UI components
import { usePermissions } from "@/hooks/use-permissions"; // Custom hooks- Barrel Exports: Core modules (
@/auth,@/db) use barrel exports for convenience - Direct Imports: UI components and utilities use direct imports for performance
- Clear Boundaries: Strict separation between client and server code
- Type Safety: Full TypeScript coverage with strict mode enabled
Portal uses BetterAuth for authentication with role-based access control (RBAC):
- Roles:
user,staff,admin - Permissions: Granular permission system for fine-grained access control
- OAuth: Support for OAuth2 provider functionality (as both client and provider)
- Passkeys: Modern passwordless authentication support
- Email: Built-in email verification and password reset flows
- ORM: DrizzleORM for type-safe database queries
- Migrations: Version-controlled schema changes via Drizzle Kit
- Relations: Properly defined relationships between entities
- Schemas: Modular schema organization (auth, oauth, api-keys, etc.)
The project uses next-intl for multi-language support:
- Locale files: Located in
locale/directory - Routing: Automatic locale-based routing
- Translations: JSON-based translation files
- Git Hooks: Husky for pre-commit linting/formatting
- Version Management: Mise (optional) for Node.js version management
- Type Safety: Strict TypeScript with comprehensive type checking
- Linting: Biome for fast linting and formatting
- Code Quality: Ultracite for enhanced code quality checks