Files
2025-12-14 13:31:29 -06:00

86 lines
2.0 KiB
Markdown

# 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](https://bun.sh) installed on your system
## Setup
1. Install dependencies:
```bash
bun install
```
2. Set environment variables (optional):
```bash
export POCKETBASE_URL=https://pocketbase.ccllc.pro
export PORT=3000
```
3. Start the development server:
```bash
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:
1. A `users` collection (or the default auth collection)
2. 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 information
- `employee_reports` - Employee reports
## Development
- Run the server: `bun run dev`
- Type check: `bun run type-check`
## License
See LICENSE file for details.