{"id":29767073,"url":"https://github.com/adityasharmahub/csv-parser-api","last_synced_at":"2026-05-01T18:32:24.869Z","repository":{"id":306586717,"uuid":"1026636967","full_name":"AdityaSharmaHub/csv-parser-api","owner":"AdityaSharmaHub","description":"CSV to JSON Parser API using Node.js and Express.js","archived":false,"fork":false,"pushed_at":"2025-07-26T11:11:28.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T22:50:07.790Z","etag":null,"topics":["csv","csv-parser","expressjs","json","json-parser","nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/AdityaSharmaHub/csv-parser-api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdityaSharmaHub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T09:43:34.000Z","updated_at":"2025-07-26T11:11:32.000Z","dependencies_parsed_at":"2025-07-26T17:24:54.896Z","dependency_job_id":"f72d942a-6308-474c-8ec1-ffbdb8834e46","html_url":"https://github.com/AdityaSharmaHub/csv-parser-api","commit_stats":null,"previous_names":["adityasharmahub/csv-parser-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AdityaSharmaHub/csv-parser-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaSharmaHub%2Fcsv-parser-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaSharmaHub%2Fcsv-parser-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaSharmaHub%2Fcsv-parser-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaSharmaHub%2Fcsv-parser-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdityaSharmaHub","download_url":"https://codeload.github.com/AdityaSharmaHub/csv-parser-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaSharmaHub%2Fcsv-parser-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","csv-parser","expressjs","json","json-parser","nodejs"],"created_at":"2025-07-27T01:37:30.945Z","updated_at":"2026-05-01T18:32:24.845Z","avatar_url":"https://github.com/AdityaSharmaHub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSV to JSON Parser API\n\nA Node.js API that converts CSV files to JSON and uploads data to PostgreSQL database with age distribution analysis.\n\n## Features\n\n- Custom CSV parser (no external libraries)\n- Handles nested properties with dot notation (e.g., `name.firstName`, `address.city`)\n- PostgreSQL database integration\n- Age distribution analysis\n- RESTful API endpoint\n\n## Setup\n\n1. **Install dependencies:**\n   ```bash\n   npm install\n   ```\n\n2. **Configure environment variables:**\n   ```bash\n   cp env.example .env\n   ```\n   Edit `.env` with your database credentials and CSV file path.\n\n3. **Create PostgreSQL database table:**\n   ```sql\n   CREATE TABLE public.users (\n     \"name\" varchar NOT NULL,\n     age int4 NOT NULL,\n     address jsonb NULL,\n     additional_info jsonb NULL,\n     id serial4 NOT NULL\n   );\n   ```\n\n4. **Start the server:**\n   ```bash\n   node index.js\n   ```\n\n## API Endpoints\n\n### GET /upload\nProcesses the CSV file and uploads data to the database.\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"message\": \"Upload complete and age distribution printed\",\n  \"usersProcessed\": 10\n}\n```\n\n## CSV Format\n\nThe CSV file should have headers with dot notation for nested properties:\n```\nname.firstName,name.lastName,age,address.line1,address.city,gender\nRohit,Prasad,35,A-563 Rakshak Society,Pune,male\n```\n\n## Environment Variables\n\n- `PORT` - Server port (default: 3000)\n- `CSV_FILE_PATH` - Path to CSV file (default: ./uploads/users.csv)\n- `PGHOST` - PostgreSQL host\n- `PGUSER` - PostgreSQL username\n- `PGPASSWORD` - PostgreSQL password\n- `PGDATABASE` - PostgreSQL database name\n- `PGPORT` - PostgreSQL port (default: 5432)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityasharmahub%2Fcsv-parser-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityasharmahub%2Fcsv-parser-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityasharmahub%2Fcsv-parser-api/lists"}