Skip to content

nvasion/screensnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screensnap

A full-stack Rust application

Features

  • Rust backend with Actix-web
  • React frontend with TypeScript
  • REST API with CRUD operations
  • Hot-reload development mode
  • Production-ready with frontend bundling

Project Structure

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

Getting Started

Prerequisites

  • Rust 1.70 or higher
  • Node.js 18 or higher
  • npm

Installation

# Install frontend dependencies
make frontend-install

# Build backend
cargo build

Development

Run backend and frontend in separate terminals:

# Terminal 1 - Backend (port 8080)
make dev-backend

# Terminal 2 - Frontend (port 5173)
make dev-frontend

The frontend dev server proxies /api requests to the backend.

Production Build

# Build both frontend and backend
make build

# Start production server
make start

In production, the Rust server serves the built frontend from frontend/dist/.

API Endpoints

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

Author

Developer

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors