The offical portal of echo Webkom.
- Node.js 20+
- pnpm (recommended) or npm
- SQLite database
- Clone the repository:
git clone <repository-url>
cd <repo>- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .envRequired environment variables:
DATABASE_URL- SQLite database connection stringBASE_URL- Application base URL (for magic links)
- Set up the database:
pnpm db:migrate
tsx scripts.ts seed- Start development server:
pnpm devVisit http://localhost:5173 to view the application.
pnpm dev- Start development server with hot reloadpnpm build- Build for productionpnpm preview- Preview production build locallypnpm start- Start production server
pnpm lint- Run Prettier and ESLint checkspnpm format- Format code with Prettierpnpm check- Run TypeScript and Svelte checkspnpm check:watch- Run checks in watch mode
pnpm test- Run all testspnpm test:unit- Run unit tests with Vitest
pnpm db:generate- Generate database migrationspnpm db:migrate- Run database migrationspnpm db:push- Push schema changes to databasepnpm db:studio- Open Drizzle Studio for database inspection
pnpm email:dev- Start React Email development server
The project includes a custom script system accessible via pnpm run script <command>:
Shows available script commands.
Seeds the database with initial data including:
- Sample users from Webkom
- Attendance status options (Møtt opp, Kommer, Fravær, etc.)
- 15 weekly meetings starting from next Wednesday at 19:00-21:00
Generates a magic link for user authentication.
Usage:
pnpm run script create-magic-link user@echo.uib.noOutput:
- Magic link URL
- Expiration timestamp
- User validation
Uses magic link authentication:
- User enters email on login page
- Magic link sent via email (or printed to console in development)
- Link validates token and creates session
- User gains access to application
Build and run with Docker:
docker build -t webkom-portal .
docker run -p 3000:3000 --env-file .env webkom-portalDATABASE_URL- SQLite database path (e.g.,file:./app.db)BASE_URL- Application URL for magic links