2.0 KiB
2.0 KiB
Employee Records
Employee records management system built with Hono, Bun, and PocketBase.
Features
- 🔐 Authentication via PocketBase
- 📊 Dashboard with employee records and reports management
- 🎨 Modern UI with Tailwind CSS
- ⚡ Fast server with Hono and Bun
Tech Stack
- Backend: Hono (web framework) + Bun (runtime)
- Frontend: Vanilla JavaScript + Tailwind CSS
- Database/Auth: PocketBase (https://pocketbase.ccllc.pro)
Prerequisites
- Bun installed on your system
Setup
- Install dependencies:
bun install
- Set environment variables (optional):
export POCKETBASE_URL=https://pocketbase.ccllc.pro
export PORT=3000
- Start the development server:
bun run dev
The server will start on http://localhost:3000
Project Structure
Employee_records/
├── src/
│ ├── server.ts # Main Hono server entry point
│ ├── routes/
│ │ ├── auth.ts # Authentication routes
│ │ └── api.ts # API routes
│ └── middleware/
│ └── auth.ts # Authentication middleware
├── public/
│ ├── index.html # Login page
│ ├── dashboard.html # Dashboard page
│ └── js/
│ ├── auth.js # Authentication client logic
│ └── dashboard.js # Dashboard logic
├── package.json
└── tsconfig.json
PocketBase Setup
Before using the application, ensure your PocketBase instance at https://pocketbase.ccllc.pro has:
- A
userscollection (or the default auth collection) - User accounts created for login
The application will connect to this PocketBase instance for authentication.
Collections
The following collections will be set up later:
employee_records- Employee informationemployee_reports- Employee reports
Development
- Run the server:
bun run dev - Type check:
bun run type-check
License
See LICENSE file for details.