How vineet-vishwakarma/verex_server works
Project type and purpose
• This is a backend RESTful API server written in Node.js/Express.
• Its main responsibilities are:
• User authentication and authorization (auth routes/controllers/middleware).
• Handling “AI agent” requests (aiAgent routes/controllers).
• Sending emails (email routes/controllers).
• It exposes JSON-based HTTP endpoints, interacts with a database, and calls external services (email provider, AI service).
File structure
• Top-level files:
• package.json / package-lock.json – Node dependencies & scripts.
• .gitignore – files to exclude from source control.
• Readme.md – project overview (currently empty, should be filled).
• src/ directory:
• index.js & app.js – Express app setup and HTTP server entry point.
• config.js & constants.js – application configuration and constants (DB URIs, API keys, port numbers).
• controllers/ – request handlers implementing business logic for each feature.
• routes/ – Express router modules mapping URL paths to controller methods.
• middlewares/ – e.g., auth.middleware.js for JWT/session verification.
• models/ – data schemas or ORM models (e.g., User model).
• db/ – database connection logic (db.js).
README for additional insights
• Overview & use cases
• Tech stack (Node.js, Express, DB type, external services)
• High-level architecture description