How senlovey/itivp-labs works
This repository implements a JWT-protected microblog API: clients register or log in, then access account, administration, and tweet endpoints. Authentication includes password controls, login-attempt logging and temporary lockouts; admin capabilities include user management and login-log review. Tweet endpoints support listing, retrieval, creation, editing and deletion, with ownership and ban checks on writes. The server and route excerpts show these runtime connections; database setup is visible in the model registry, but the README is empty and database configuration was not sampled.
Main entry points: server.js Tweet and admin routes · routes/auth.js Account routes · middleware/auth.js JWT verification · user.js User model
Components 11
API endpoints
- Express API server
server.js - Account routes
routes/auth.js - Tweet and admin routes
server.js
Authentication and access
- JWT verification
middleware/auth.js - Role and ban checks
middleware/auth.js
Domain models
- User model
models/user.js - Tweet model
models/tweet.js - Login log model
models/loginlog.js
Persistence
- Sequelize model registry
models/index.js
Other components
- API client
- Configured database
Connections 15
- API client → Express API server: sends requests
server.js - Express API server → Account routes: mounts routes
server.js - API client → Account routes: registers or logs in
routes/auth.js - Account routes → User model: reads and updates
routes/auth.js - Account routes → Login log model: records attempts
routes/auth.js - Account routes → JWT verification: protects account changes
routes/auth.js - Express API server → Tweet and admin routes: handles API routes
server.js - Tweet and admin routes → JWT verification: verifies protected requests
server.js - Tweet and admin routes → Role and ban checks: checks write access
server.js - Tweet and admin routes → User model: manages users
server.js - Tweet and admin routes → Login log model: reads login logs
server.js - Tweet and admin routes → Tweet model: reads and writes tweets
server.js - JWT verification → Role and ban checks: passes verified identity
middleware/auth.js - Role and ban checks → User model: checks ban status
middleware/auth.js - Sequelize model registry → Configured database: initializes connection