Extract reference data service from monorepo#6
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Extract reference data service from monorepo#6devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Copy entire reference-data/ directory to root of new repository - Include S&P 500 companies CSV data file (507 entries) - Create standalone Docker Compose configuration - Maintain all NestJS functionality and API endpoints - Service runs on port 18085 with /stocks and /health endpoints - Verified service builds, starts, and API endpoints work correctly Co-Authored-By: Samir Chaudhry <schaudhry123@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract Reference Data Service to Standalone Repository
Overview
This PR extracts the reference data service from the
COG-GTM/traderXCognitiondemosmonorepo into a new standalone repository. The service is a complete NestJS application that provides stock ticker and company information via REST APIs.Changes Made
Files Extracted
data/s-and-p-500-companies.csv) - 507 company recordsopenapi.yaml) describing REST endpointspackage.json) with all NestJS dependenciesKey Components
src/stocks/stocks.controller.ts) - REST API endpointssrc/stocks/stocks.service.ts) - Business logic for data retrievalsrc/data-loader/load-csv-data.ts) - Loads S&P 500 data from CSVsrc/health/health.controller.ts) - Service health monitoringsrc/main.ts) - NestJS bootstrap with Swagger documentationDocker Configuration
Created standalone
docker-compose.ymlthat:Testing Results ✅
Build and Start Verification
npm install- Dependencies installed successfullynpm run build- Service builds without errorsnpm run start- Service starts and runs on port 18085API Endpoint Verification
GET http://localhost:18085/stocks- Returns all 505 S&P 500 companies in JSON formatGET http://localhost:18085/stocks/AAPL- Returns specific ticker:{"ticker":"AAPL","companyName":"Apple"}GET http://localhost:18085/health- Returns health status:{"status":"ok"}Data Loading Verification
./data/s-and-p-500-companies.csvService Functionality
The extracted service maintains full functionality:
/apiendpointDependencies
The service is now completely standalone with no external dependencies on other TraderX services. All required data is included in the repository.
Usage
The service will be available at
http://localhost:18085with API documentation athttp://localhost:18085/api.Link to Devin run: https://app.devin.ai/sessions/9c8bdb6c74f6449ebcef1b2d40328adb
Requested by: Samir Chaudhry (samir@cognition.ai)