SystemCore is a modern, scalable, and highly secure web application built with a focus on Domain-Driven Design (DDD) and robust software architecture. It features a complete authentication system and a responsive dashboard layout.
bun:sqlite)This project strictly follows enterprise-grade software engineering patterns:
auth, users) inside src/lib/domains/.src/lib/domains/schema.ts) to maintain type-safety and keep database connection files clean.Navbar.svelte, UserForm.svelte) keeping the page files lightweight.hooks.server.ts) preventing unauthorized access to protected routes.Authentication System:
/login).Database Management:
$defaultFn(() => crypto.randomUUID()).createdAt, updatedAt).Dashboard Layout:
+layout.svelte integrating a persistent Navbar.Ensure you have Bun installed on your machine.
```bash bun install
src/ ├─ lib/ │ ├─ components/ # Reusable UI components (Navbar, Forms, etc.) │ ├─ domains/ # Domain-Driven schema and logic (Auth, Users) │ │ └─ schema.ts # The central Barrel File for all schemas │ ├─ server/ │ │ ├─ db.ts # Database connection setup │ │ └─ auth.ts # Better Auth server configuration │ └─ auth-client.ts # Better Auth client instance │ ├─ routes/ │ ├─ api/auth/[...all]/# Catch-all route for Better Auth endpoints │ ├─ login/ # Sign-in page │ ├─ signup/ # Registration page │ ├─ +layout.svelte # Global dashboard layout & Navbar │ └─ +page.svelte # Main dashboard / User Management UI │ ├─ hooks.server.ts # Server-side middleware & route protection └─ app.d.ts # Global TypeScript interfaces (Typed Locals)
Code snippet
BETTER_AUTH_SECRET="my-super-secret-key-for-learning"
PUBLIC_BASE_URL="http://localhost:5173"
git init git add . git commit -m "first commit" git branch -M main git remote add origin https://github.com/nextnayan/SvelteKit_better_auth_squlit.git git push -u origin main