A simple, generic application skeleton with Authentication (Login, Register, Logout, Profile) and a Dashboard layout.
Install Dependencies:
bun install
Environment Variables:
Create a .env.local file (or .env if not ignored) with the following content:
# Private Secrets (Backend only)
DB_USER="user"
DB_PASSWORD="password"
DB_HOST="localhost"
DB_PORT="5432"
DB_NAME="dbname"
JWT_SECRET="your-secure-secret-key"
# Public Configuration (Exposed to Client)
PUBLIC_APP_NAME="My Generic App"
Note: Secrets like database credentials and
JWT_SECRETare kept private for security.
Database Setup:
bun drizzle-kit push
Run Development Server:
bun dev
(app) group is protected; unauthenticated users are redirected to /login.src/lib/server/db.ts: Database connection.src/lib/server/schema.ts: Drizzle schema definition.src/lib/server/auth.ts: Auth utilities (JWT, Password Hashing).src/hooks.server.ts: Session verification middleware.src/routes/(app): Authenticated routes (Dashboard, Profile).src/routes/login & register: Public auth routes.