How areeb0206/trade_backend_test works
Project type and purpose
• This is a Node.js/Express REST-API backend for a “Trading Journal” platform.
• It exposes both public/user endpoints (under routes/api) and admin endpoints (under routes/adminApi).
• It integrates with external brokers (E*Trade, Questrade, MetaTrader, Kraken, Polygon), Stripe for payments, SnapTrade, Redis (dump.rdb), AWS S3, and MongoDB via Mongoose models.
File structure
• Top-level layers:
• config (app/Mongo/third-party credentials)
• routes (API vs. adminApi)
• controllers (one per feature, orchestrating request→response)
• services (business logic, third-party SDK wrappers, CSV upload parsers, report generators)
• models (Mongoose schemas)
• middlewares (JWT auth, role checks, input validation)
• helpers/utils/templates (shared utilities: bcrypt, email, file upload, socket.io)
• Docker-compose and dump.rdb indicate local containerization with Redis (cache/session) and likely MongoDB.
Key insights from README
• Minimal README suggests focus on backend logic; actual architecture must be inferred from code organization.