Skip to content

Extract Reference Data Service from Monorepo#5

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1750303349-extract-reference-data-service
Open

Extract Reference Data Service from Monorepo#5
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1750303349-extract-reference-data-service

Conversation

@devin-ai-integration
Copy link

Extract Reference Data Service to Standalone Repository

This PR extracts the reference data service from the COG-GTM/traderXCognitiondemos monorepo into a new standalone repository. The service is a complete NestJS application that provides stock ticker information via REST APIs.

Changes Made

  • Complete service extraction: Copied entire /reference-data directory structure from the monorepo
  • All required files included:
    • NestJS application source code (src/ directory)
    • Package configuration with all dependencies (package.json)
    • Docker configuration (Dockerfile, base.Dockerfile)
    • Stock data file (data/s-and-p-500-companies.csv with 507 S&P 500 companies)
    • API specification (openapi.yaml)
    • Configuration files (.eslintrc.js, .prettierrc, nest-cli.json, tsconfig.json)

Service Architecture

  • Main Application: src/app.module.ts imports StocksModule and HealthModule
  • Stocks API: Complete CRUD operations with endpoints:
    • GET /stocks - Returns all stocks from CSV data
    • GET /stocks/{ticker} - Returns specific stock by ticker symbol
  • Health Monitoring: GET /health endpoint using @nestjs/terminus
  • Data Loading: Automatic CSV parsing of S&P 500 companies data
  • Swagger Documentation: Available at /api endpoint

Environment Configuration

  • Default Port: 18085
  • Environment Variables:
    • REFERENCE_DATA_SERVICE_PORT (default: 18085)
    • REFERENCE_DATA_HOSTNAME (default: 0.0.0.0)

Verification Results

Service builds successfully - npm run build completed without errors
Service starts correctly - Runs on port 18085 as expected
API endpoints functional:

  • GET /stocks returns complete list of 507 stocks
  • GET /stocks/MMM returns specific stock data for 3M Company
  • GET /health returns health check status
    All dependencies resolved - No missing packages or build issues
    Data loading works - CSV file properly parsed and loaded

Testing Commands Used

npm install
npm run build
npm run start
curl http://localhost:18085/stocks
curl http://localhost:18085/stocks/MMM
curl http://localhost:18085/health

The service is now completely independent and ready for deployment as a standalone microservice.

Link to Devin run: https://app.devin.ai/sessions/f924326f296b46439860a56d99c9daa3
Requested by: Samir Chaudhry (samir@cognition.ai)

- Copy complete NestJS application structure from traderXCognitiondemos/reference-data
- Include all source code, configuration files, and S&P 500 CSV data
- Service provides stock ticker information via REST APIs on port 18085
- Verified service builds, starts, and API endpoints work correctly
- All 507 S&P 500 companies data included and functional

Co-Authored-By: Samir Chaudhry <schaudhry123@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants