How aklesh-dev/streamly works
Project type and purpose
• From the file tree and README, we see two sibling folders (“admin service” and “userServices”), each a Node.js+TypeScript REST API with its own src→dist build pipeline.
• This is a small microservices‐style backend: one service handles “admin” operations, the other handles “user” operations. Both use layered code (routes, controllers, middleware, database config).
File structure
• Top level:
• “admin service”
• “userServices”
• Inside each:
• src/ – TypeScript source files (route.ts, controller.ts, middleware, lib/db.config.ts, etc.)
• tsconfig.json – TypeScript compiler settings
• package.json – service dependencies / scripts
• dist/ – compiled JavaScript output mirroring src/ layers
• Common architectural pattern in each service:
• Routes → Controllers → (Models/lib) → DB
• Middleware chain for error handling (TryCatch), authentication (auth.middleware), and file uploads (multer.middleware + dataUri)
README for additional insights
• It only documents how to initialize TypeScript, compile (npx tsc), and run via ts-node.
Elements
• Clear, human‐readable labels for each component (e.g., “Auth Middleware,” “User Controller”).
• Annotations for build steps (TS compile) and deployment artifacts (dist/, Docker container if applicable).