Skip to content
Aman Verma edited this page Jan 18, 2025 · 1 revision

Folder Structure API

Welcome to the Folder Structure API, a service designed to help you efficiently manage and organize folder structures for your projects. This API simplifies how you define, visualize, and retrieve folder structures for development projects.

Features

  • Dynamic Folder Structure Generation: Create and retrieve customized folder structures for your projects.
  • API-driven: Interact with the service via RESTful APIs.
  • Fast and Scalable: Built with performance and scalability in mind.
  • Visualization Support: Visualize folder structures in an organized manner.

API Documentation

The API base URL is:

https://folder-structure-production.up.railway.app/

Endpoints

1. Create Folder Structure

POST /create

Request Body:

{
  "projectName": "MyProject",
  "folders": [
    {
      "name": "src",
      "subfolders": [
        { "name": "components" },
        { "name": "services" }
      ]
    },
    { "name": "public" },
    { "name": "tests" }
  ]
}

Response:

{
  "message": "Folder structure created successfully",
  "data": {
    "projectId": "12345",
    "structure": {
      "src": {
        "components": {},
        "services": {}
      },
      "public": {},
      "tests": {}
    }
  }
}

2. Get Folder Structure

GET /get/{projectId}

Response:

{
  "projectId": "12345",
  "structure": {
    "src": {
      "components": {},
      "services": {}
    },
    "public": {},
    "tests": {}
  }
}

3. Delete Folder Structure

DELETE /delete/{projectId}

Response:

{
  "message": "Folder structure deleted successfully"
}

Getting Started

Prerequisites

  • Node.js or any API testing tool (e.g., Postman, cURL) to interact with the API.
  • Internet access to reach the hosted service.

Installation (For local development)

If you want to set up the API locally:

  1. Clone the repository:

    git clone https://github.com/your-repo/folder-structure-api.git
    cd folder-structure-api
  2. Install dependencies:

    npm install
  3. Start the server:

    npm start
  4. Access the API locally at:

    http://localhost:3000/
    

Deployment

The API is deployed using Railway and can be accessed at:

https://folder-structure-production.up.railway.app/

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/your-feature-name
  3. Commit your changes:
    git commit -m "Add some feature"
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Open a pull request.

License

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

Contact

For questions or support, contact:


Happy coding!