A production-ready full-stack Employee Management System
Built with a Rust server-side backend and a modern React frontend.
This project is a full-stack Employee Management System (EMS) designed with scalability, maintainability, and production-readiness in mind.
- Backend: Rust (Axum) – server-side rendered API & static frontend serving
- Frontend: React + Tailwind + shadcn/ui
- Database: PostgreSQL
- Deployment: Docker & Docker Compose
The backend serves both:
- REST APIs under
/api/* - The compiled frontend SPA
👉 Configurable CORS support for modular development.
graph TD
A["Frontend: React + Tailwind + shadcn/ui"] -->|API Requests| B(Rust Backend: Axum • SQLx • Tokio);
B --> C[PostgreSQL DB];
subgraph Rust Backend
B1["/api/* → REST endpoints"]
B2["/* → React SPA"]
end
B -.-> B1
B -.-> B2
Tech Stack
- Rust
- Axum – HTTP server & routing
- SQLx – async PostgreSQL driver
- Tokio – async runtime
- UUID – primary keys
- Docker – containerized runtime
Key Backend Features
- Modular architecture (models, services, handlers, routes)
- Runtime-safe SQL (Docker-compatible, no compile-time DB dependency)
- Shared application state via
AppState - SPA fallback routing (client-side routing works on refresh)
- Clean REST API design
Example API Routes
GET /api/users
POST /api/users
GET /api/users/{id}
PUT /api/users/{id}
DELETE /api/users/{id}Tech Stack
- React
- TypeScript
- Tailwind CSS
- shadcn/ui
- Sonner (toasts & notifications)
UI Architecture
components/
├─ atoms/
├─ molecules/
├─ organisms/
└─ ui/ (design system)
pages/
└─ UserPage.tsx
state/
└─ user.store.ts (state + side effects)
services/
└─ user.service.ts (API calls only)
api/
├─ endpoints.ts
└─ http.tsUI Features
- Sidebar-based admin layout
- Responsive (desktop / tablet / mobile)
- Search & filtering
- Add / Edit / Delete employees
- Accessible components
- Clean spacing & layout discipline
Prerequisites
- Docker
- Docker Compose
Start the full stack
docker compose up --buildServices started:
- Rust API + frontend server
- PostgreSQL database
Backend runs on: http://localhost:8000
- PostgreSQL
- Managed via SQL migrations
- UUID primary keys
- Timestamped records
Example table:
CREATE TABLE users (
id UUID PRIMARY KEY,
username TEXT,
email TEXT,
password_hash TEXT,
created_at TIMESTAMP,
updated_at TIMESTAMP
);- Server-side first (no frontend proxy hacks)
- Same-origin architecture
- Strict separation of concerns
- No business logic in UI
- No SQL in handlers
- No API calls in components
This codebase is designed to scale beyond CRUD into:
- Roles & permissions
- Audit logs
- Organization hierarchies
- HR workflows
- Authentication & RBAC
- Pagination & filtering at DB level
- Activity audit logs
- WebSockets for live updates
- Admin role management
- CI/CD pipeline
MIT License Use freely for learning, internal tools, or production systems.
Built with an emphasis on correct architecture, not shortcuts. Rust on the server. Clean UI on the client. No compromises.
“Good systems are boring. Boring means predictable. Predictable means scalable.”