How vh1dzdev/graphlogger works
GraphLogger is a small FastAPI service for creating logger IDs, recording IP-addressed visits, retrieving logs, and deleting log records. A client reaches the API routes, which delegate operations to the SQLite-backed Logger; the app initializes the database at startup. The route code also defines a root redirect to the FastAPI docs. The supplied excerpts show response schemas and a token request model, but do not show token validation; the database file is created at runtime and is not in the repository tree.
Main entry points: routes.py API routes · config.py Database path · main.py FastAPI app · sql.py Create logger
Components 12
Application runtime
- FastAPI app
main.py
HTTP API
- API routes
src/api/routes.py - Token model
src/api/classes.py - Response schemas
src/api/misc.py
Persistence
- Create logger
utils/sql.py - Record visit
utils/sql.py - Delete logs
utils/sql.py - Retrieve logs
utils/sql.py - Database initialization
utils/sql.py - Database path
config.py - SQLite database
Other components
- API client
Connections 20
- API client → FastAPI app: opens docs
main.py - API client → API routes: calls endpoints
src/api/routes.py - FastAPI app → API routes: mounts router
main.py - FastAPI app → Database initialization: initializes at startup
main.py - API routes → Token model: parses token model
src/api/routes.py - API routes → Response schemas: uses response schemas
src/api/routes.py - API routes → Create logger: creates logger
src/api/routes.py - API routes → Record visit: records visit
src/api/routes.py - API routes → Delete logs: deletes logs
src/api/routes.py - API routes → Retrieve logs: retrieves logs
src/api/routes.py - Database initialization → Database path: reads path
utils/sql.py - Create logger → Database path: reads path
utils/sql.py - Record visit → Database path: reads path
utils/sql.py - Delete logs → Database path: reads path
utils/sql.py - Retrieve logs → Database path: reads path
utils/sql.py - Database initialization → SQLite database: creates tables
utils/sql.py - Create logger → SQLite database: writes logger
utils/sql.py - Record visit → SQLite database: checks and writes
utils/sql.py - Delete logs → SQLite database: deletes records
utils/sql.py - Retrieve logs → SQLite database: queries records
utils/sql.py