How mmn92/node-logins works
This repository contains three small Node.js login-server examples: Fastify, Koa, and Node’s built-in HTTP server. Each exposes login and token-validation endpoints; the Fastify and Koa implementations check an in-memory user list and issue or verify JWTs, while the native HTTP version does likewise with explicit request-body parsing. The Fastify app also autoloads plugins and routes, including an example route. The README describes the project only generally, so the graph reflects the sampled implementations rather than assuming they share runtime components.
Main entry points: app.ts App and autoload · root.ts Login and validation · src/server.ts Server and routes · src/server.ts HTTP server and routes
Components 18
Fastify server
- App and autoload
fast-login/src/app.ts - Login and validation
fast-login/src/routes/root.ts - In-memory users
fast-login/src/routes/root.ts - JWT signing and verification
fast-login/src/routes/root.ts - Example routes
fast-login/src/routes/example/index.ts - HTTP utilities plugin
fast-login/src/plugins/sensible.ts - Support decorator
fast-login/src/plugins/support.ts
Koa server
- Server and routes
login-server/src/server.ts - Body parsing
login-server/src/server.ts - Login and validation
login-server/src/server.ts - In-memory users
login-server/src/server.ts - JWT signing and verification
login-server/src/server.ts
Native HTTP server
- HTTP server and routes
node-http/src/server.ts - Body parsing
node-http/src/server.ts - Login and validation
node-http/src/server.ts - In-memory users
node-http/src/server.ts - JWT signing and verification
node-http/src/server.ts
Other components
- HTTP client
Connections 17
- HTTP client → Login and validation: sends requests
fast-login/src/routes/root.ts - App and autoload → Login and validation: autoloads routes
fast-login/src/app.ts - App and autoload → Example routes: autoloads routes
fast-login/src/app.ts - App and autoload → HTTP utilities plugin: autoloads plugins
fast-login/src/app.ts - App and autoload → Support decorator: autoloads plugins
fast-login/src/app.ts - Login and validation → In-memory users: checks credentials
fast-login/src/routes/root.ts - Login and validation → JWT signing and verification: signs or verifies
fast-login/src/routes/root.ts - HTTP client → Server and routes: sends requests
login-server/src/server.ts - Server and routes → Body parsing: registers parser
login-server/src/server.ts - Server and routes → Login and validation: registers routes
login-server/src/server.ts - Login and validation → In-memory users: checks credentials
login-server/src/server.ts - Login and validation → JWT signing and verification: signs or verifies
login-server/src/server.ts - HTTP client → HTTP server and routes: sends requests
node-http/src/server.ts - HTTP server and routes → Body parsing: parses login body
node-http/src/server.ts - HTTP server and routes → Login and validation: dispatches routes
node-http/src/server.ts - Login and validation → In-memory users: checks credentials
node-http/src/server.ts - Login and validation → JWT signing and verification: signs or verifies
node-http/src/server.ts