A full-stack Rust application
- Rust backend with Actix-web
- React frontend with TypeScript
- REST API with CRUD operations
- Hot-reload development mode
- Production-ready with frontend bundling
screensnap/
├── src/ # Rust backend
│ ├── main.rs # Server entry point
│ ├── api.rs # API route handlers
│ └── models.rs # Data models
├── frontend/ # React frontend
│ ├── src/
│ │ ├── main.tsx # React entry point
│ │ └── App.tsx # Main component
│ └── package.json
├── tests/ # Rust tests
├── Makefile # Build commands
└── Cargo.toml # Rust dependencies
- Rust 1.70 or higher
- Node.js 18 or higher
- npm
# Install frontend dependencies
make frontend-install
# Build backend
cargo buildRun backend and frontend in separate terminals:
# Terminal 1 - Backend (port 8080)
make dev-backend
# Terminal 2 - Frontend (port 5173)
make dev-frontendThe frontend dev server proxies /api requests to the backend.
# Build both frontend and backend
make build
# Start production server
make startIn production, the Rust server serves the built frontend from frontend/dist/.
| Method | Path | Description |
|---|---|---|
| GET | /api/items | List all items |
| GET | /api/items/:id | Get single item |
| POST | /api/items | Create item |
| DELETE | /api/items/:id | Delete item |
| GET | /api/health | Health check |
| GET | /api/version | API version |
Developer
MIT