https://github.com/dibbayajyotiroy/rust-fullstack-app
Full Stack Application for EMS made with React and Rust backend as serverside, with Dockerization.
https://github.com/dibbayajyotiroy/rust-fullstack-app
docker employee-management employee-management-system ems reactjs rust
Last synced: about 2 months ago
JSON representation
Full Stack Application for EMS made with React and Rust backend as serverside, with Dockerization.
- Host: GitHub
- URL: https://github.com/dibbayajyotiroy/rust-fullstack-app
- Owner: DibbayajyotiRoy
- Created: 2025-12-21T15:44:44.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-17T20:19:55.000Z (5 months ago)
- Last Synced: 2026-01-18T05:00:06.805Z (5 months ago)
- Topics: docker, employee-management, employee-management-system, ems, reactjs, rust
- Language: TypeScript
- Homepage:
- Size: 694 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🧑💼 Employee Management System
A production-ready full-stack Employee Management System
Built with a Rust server-side backend and a modern React frontend.
---
## 📌 Overview
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.**
---
## 🏗 Architecture
```mermaid
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
```
### ⚙️ Backend (Rust – Server Side)
**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**
```rust
GET /api/users
POST /api/users
GET /api/users/{id}
PUT /api/users/{id}
DELETE /api/users/{id}
```
### 🎨 Frontend
**Tech Stack**
- **React**
- **TypeScript**
- **Tailwind CSS**
- **shadcn/ui**
- **Sonner** (toasts & notifications)
**UI Architecture**
```yaml
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.ts
```
**UI Features**
- Sidebar-based admin layout
- Responsive (desktop / tablet / mobile)
- Search & filtering
- Add / Edit / Delete employees
- Accessible components
- Clean spacing & layout discipline
---
## 🐳 Running with Docker
**Prerequisites**
- Docker
- Docker Compose
**Start the full stack**
```bash
docker compose up --build
```
**Services started:**
1. Rust API + frontend server
2. PostgreSQL database
**Backend runs on:**
http://localhost:8000
---
## 🗄 Database
- **PostgreSQL**
- Managed via SQL migrations
- UUID primary keys
- Timestamped records
**Example table:**
```sql
CREATE TABLE users (
id UUID PRIMARY KEY,
username TEXT,
email TEXT,
password_hash TEXT,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
```
---
## 🔒 Design Principles
- **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
---
## 🚀 Future Enhancements
- [ ] Authentication & RBAC
- [ ] Pagination & filtering at DB level
- [ ] Activity audit logs
- [ ] WebSockets for live updates
- [ ] Admin role management
- [ ] CI/CD pipeline
---
## 📄 License
**MIT License**
Use freely for learning, internal tools, or production systems.
---
## ✨ Author
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.”