How ldong1103/review_dong works
This is a small Rust web application for signup, login, logout, and a session-aware home page; the repository does not show review creation or review management. The main workflow is an HTTP request routed to a page or authentication handler, which renders a response or reads/writes user and session records in SQLite. Startup initializes the database and serves the router. The excerpts show these paths and the template bindings; browser interaction is inferred, so that connection is marked unverified.
Main entry points: web/mod.rs HTTP router · auth.rs Auth handlers · pages.rs Page handlers · server/mod.rs Server startup
Components 11
Application runtime
- Server startup
src/server/mod.rs
Web interface
- HTTP router
src/web/mod.rs - App state
src/web/state.rs - Page handlers
src/web/handlers/pages.rs - Template types
src/web/templates.rs - HTML templates
templates - HTTP errors
src/web/error.rs
Authentication
- Auth handlers
src/web/handlers/auth.rs
Persistence
- Schema setup
src/database/mod.rs - SQLite database
Other components
- Visitor
Connections 16
- Visitor → Server startup: sends requests
- Server startup → Schema setup: initializes schema
src/server/mod.rs - Server startup → HTTP router: serves router
src/server/mod.rs - HTTP router → App state: provides state
src/web/mod.rs - HTTP router → Page handlers: routes pages
src/web/mod.rs - HTTP router → Auth handlers: routes auth
src/web/mod.rs - Page handlers → App state: reads pool
src/web/handlers/pages.rs - Auth handlers → App state: reads pool
src/web/handlers/auth.rs - Page handlers → SQLite database: reads sessions
src/web/handlers/pages.rs - Auth handlers → SQLite database: reads and writes
src/web/handlers/auth.rs - Schema setup → SQLite database: creates tables
src/database/mod.rs - Page handlers → Template types: renders pages
src/web/handlers/pages.rs - Auth handlers → Template types: renders forms
src/web/handlers/auth.rs - Template types → HTML templates: binds templates
src/web/templates.rs - HTTP router → HTTP errors: uses errors
src/web/mod.rs - Auth handlers → Visitor: sets session cookie
src/web/handlers/auth.rs