CodersHub Inc
ProjectsContactHire Me
CodersHub Inc LogoCodersHub Inc

A collection of practical, open-source projects designed to solve real-world developer problems.

Quick Links

All ProjectsContactGitHub Organization

Resources

Source CodeReport IssuesAbout Creator

Stay Updated

Get notified about new projects and updates. No spam, ever.

By subscribing, you agree to our privacy policy.

© 2025 CodersHub Inc. All rights reserved.

Privacy PolicyTerms of Service
Made withbySwapnil Ingle
Back to Projects

Open Api TS

This project is an open API implementation using TypeScript. Please Star the repo. It provides a set of common data and utilities for various countries, including city names, first names, last names, and more.

Languages Used
TypeScriptJavaScript
Technologies
apiapi-restbackendbackend-apicolaborationcollaborategithubnestjsnodejsrest-apirestful-apiserverserverless-frameworkstudent-vscodetechts
View SourceLive Demo

Open API TS

This project is an open API implementation using TypeScript. It provides a set of common data and utilities for various countries, including city names, first names, last names, and more.

Features

  • Common data for multiple countries
  • Utility functions for data handling
  • Modular structure for easy extension

API Endpoints

UserController

Get User by Country

  • URL: /user/:country
  • Method: GET
  • URL Params:
    • country=[string] (required)
  • Success Response:
    • Code: 200
    • Content:

      { "FirstName": "John", "LastName": "Doe", "Gender": "male", "Email": "john.doe@codershubinc.tech", "Phone": "123-456-7890", "Address": { "Street": "123 Main St", "City": "Anytown", "State": "Anystate", "Zip": "12345" } }

  • Error Response:
    • Code: 404 NOT FOUND
    • Content:

      { "status": "error", "message": "Country not found" }

    • Code: 500 INTERNAL SERVER ERROR
    • Content:

      { "status": "error", "message": "Internal server error" }

Example Request

curl -X GET "http://localhost:3000/user/US"

Example Response

{ "FirstName": "John", "LastName": "Doe", "Gender": "male", "Email": "john.doe@codershubinc.tech", "Phone": "123-456-7890", "Address": { "Street": "123 Main St", "City": "Anytown", "State": "Anystate", "Zip": "12345" } }

Dependencies

  • @nestjs/common: ^10.0.0
  • @nestjs/core: ^10.0.0
  • @nestjs/platform-express: ^10.0.0
  • axios: ^1.8.1
  • reflect-metadata: ^0.2.0
  • rxjs: ^7.8.1

Getting Started

To get started with this project, clone the repository and install the dependencies:

$ git clone <repository-url> $ cd open-api-TS $ bun install or $ npm install

Running Tests

To run tests, use the provided scripts in package.json:

$ npm test $ npm run test:watch $ npm run test:cov $ npm run test:debug $ npm run test:e2e

For more information on the available API endpoints, please refer to the API Endpoints Documentation.

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing to Open API TS

We welcome contributions to the Open API TS project! Here are some guidelines to help you get started:

How to Contribute

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes.
  4. Submit a pull request.
  5. For more information on the available API endpoints, please refer to the API Endpoints Documentation.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Reporting Issues

If you find a bug or have a feature request, please create an issue in the issue tracker.

Project Structure
  • .eslintrc.js
  • .github
    • FUNDING.yml
  • .gitignore
  • .prettierrc
  • CONTRIBUTING.md
  • DIR_STRUCTURE.md
  • README.md
  • api-endpoints.md
  • bun.lock
  • nest-cli.json
  • package.json
  • structure.md
  • tsconfig.build.json
  • tsconfig.json
  • tsconfig.prod.json
  • vercel.json
  • LICENSE/
  • src/
    • app.controller.spec.ts
    • app.controller.ts
    • app.module.ts
    • app.service.ts
    • main.ts
    • api/
      • v0.1
        • endpoints.ts
        • index.module.ts
        • avatars/
          • avatar.controller.ts
          • avatar.module.ts
          • avatar.service.ts
          • utils/
            • avatar.constants.ts
            • avatar.url.ts
        • trade/
          • trade.controller.ts
          • trade.module.ts
          • trade.service.ts
          • data/
            • index.ts
            • high_low/
              • AAME.ts
              • AAPL.ts
              • AIRS.ts
              • AMZN.ts
              • APA.ts
              • APP.ts
              • ATAI.ts
              • ATGL.ts
              • ATHE.ts
              • AUTL.ts
              • DB.ts
              • DBI.ts
              • DBX.ts
              • DUOL.ts
              • IBM.ts
              • index.ts
              • SBFM.ts
              • SHOT.ts
              • SKYQ.ts
            • overview/
              • AAME.ts
              • AAPL.ts
              • AIRS.ts
              • AMZN.ts
              • APA.ts
              • APP.ts
              • ATAI.ts
              • ATGL.ts
              • ATHE.ts
              • AUTL.ts
              • DB.ts
              • DBI.ts
              • DBX.ts
              • DUOL.ts
              • IBM.ts
              • index.ts
              • SBFM.ts
              • SHOT.ts
              • SKYQ.ts
          • utils/
            • constants.ts
            • getData.ts
        • user/
          • user.controller.ts
          • user.module.ts
          • user.service.ts
          • util/
            • createUserDataFromData.ts
            • getUserData.ts
    • common/
      • data/
        • contryData/
          • data/
            • AU/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • BR/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • CA/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • CH/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • DE/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • DK/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • ES/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • GB/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • IN/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • states.ts
              • streets.ts
            • US/
              • cities.ts
              • femaleFirstName.ts
              • firstName.ts
              • index.ts
              • lastName.ts
              • maleFirstName.ts
              • middleName.ts
              • states.ts
              • streets.ts
              • timeZone.ts
          • utils/
            • constants/
              • allContryCodes.ts
              • index.ts
            • handler/
              • contry.data.controller.ts
            • interfaces/
              • contry.data.interface.ts
      • handlers/
        • async.handler.ts
      • helpers/
        • error.api.ts
        • responce.api.ts
      • interfaces/
        • asyncHandler.interface.ts
      • util/
        • crypto.util.ts
        • random.util.ts
  • test/
    • app.e2e-spec.ts
    • jest-e2e.json
*.ts 154*.json 7*.md 5*.1 1*.github 1*.gitignore 1*.js 1*.lock 1*.prettierrc 1*.yml 1 Total 173

Project Details

Repository
open-api-TS
Created At
February 15, 2025

( 10 months ago )

First Commit
February 15, 2025

( 10 months ago )


Tagline
This project is an open API implementation using TypeScript. Please Star the repo. It provides a set of common data and utilities for various countries, including city names, first names, last names, and more.
Languages
TypeScriptJavaScript
Technologies
apiapi-restbackendbackend-apicolaborationcollaborategithubnestjsnodejsrest-apirestful-apiserverserverless-frameworkstudent-vscodetechts

File Counts

*.ts 154*.json 7*.md 5*.1 1*.github 1*.gitignore 1*.js 1*.lock 1*.prettierrc 1*.yml 1
Total 173