KembaliArsip / superapp-workplace / hr-knowledge-hub
superapp-workplace
hr-knowledge-hub
369 file · 528.5 MB
Sistem informasi live — hr-knowledge-hub-vert.vercel.appBuka di tab baru
README
HR Knowledge Hub
Self-contained HR learning and knowledge platform built with Next.js, Prisma, and SQLite.
Core Stack
- Next.js App Router + TypeScript
- Prisma ORM + SQLite (
prisma/dev.db) - Zod validation for API contracts
- Cookie-based authentication (self-contained, no external auth provider)
Features
- 20 HR domains with books, frameworks, certifications, metrics, templates, trends
- Bookmarking, notes, progress tracking, quiz attempts
- AI assistant endpoint (optional
ANTHROPIC_API_KEY) - Security hardening: auth middleware, rate limiting, security headers
Local Setup
- Install dependencies
npm install
- Configure environment
cp .env.example .env.local
- Prepare database
npm run db:generate
npm run db:push
npm run db:seed
- Start development server
npm run dev
Default Seed Users
After running npm run db:seed:
- Admin:
admin@hrhub.local/Admin123!@# - User:
user@hrhub.local/User123!@#
Override with:
SEED_ADMIN_EMAILSEED_ADMIN_PASSWORDSEED_USER_EMAILSEED_USER_PASSWORD
Environment Variables
Required for production:
AUTH_SECRET(minimum 32 chars)SESSION_MAX_AGE_SECONDS(optional, default 86400)NEXT_PUBLIC_APP_URL
Optional:
ANTHROPIC_API_KEYHR_API_URL
Deployment (Vercel + GitHub)
- Push to GitHub
- Import repository to Vercel
- Set environment variables in Vercel project settings
- Build command:
prisma generate && next build - Runtime uses committed SQLite DB with startup copy to
/tmpin Vercel
File Utama
- .env.example
- .gitignore
- README.md
- components.json
- eslint.config.mjs
- index.html
- middleware.ts
- next-env.d.ts