This README provides guidance on deploying and using the API Spec Quickstart, a tool designed to accelerate fullstack application development by enabling front-end developers to easily build and interact with APIs. Inspired by the concept of front-end enablement, this tool offers a user-friendly approach to creating and using API specifications, focusing on improving the UI/UX development process.
To read more about how to use this repository, check out the blog post.
- AWS account
- SAM CLI installed
-
Clone the Repository: Clone the
api-spec-quickstart
repository from GitHub to your local machine.git clone https://github.com/allenheltondev/api-spec-quickstart.git
-
Navigate to the Project Directory: Change your directory to the cloned repository.
cd api-spec-quickstart
-
Build the Project Using SAM CLI: Use the SAM CLI to build your project.
sam build
-
Deploy the Project: Deploy your application to AWS using the SAM CLI.
sam deploy --guided
Follow the prompts to configure your deployment settings.
Define a JSON object representing your data model. For instance, a blog post entity might look like this:
{
"slug": "your-article-slug",
"title": "Your Article Title",
"date": "YYYY-MM-DD",
"categories": ["category1"],
"tags": ["tag1", "tag2"],
"socialPosts": [
{
"type": "Social Media Platform",
"message": "Your social media message",
"scheduledDate": "YYYY-MM-DDTHH:MM:SS"
}
]
}
-
Create or Copy Your JSON Object: Prepare the JSON object representing the data you want to transform into an API.
-
Deploy the Spec Generation Stack: Deploy the generator using the SAM CLI, as described above.
-
Run the Generator: Use the deployed API to generate your API spec.
-
View and Use the Generated Spec: Access the generated API spec and use it as a foundation for your application development.
Example Request Body
{
"resourceName": "content",
"example": {
"title": "hello",
"services": ["Cache"],
"socialPosts": [{"id": "asdf", "type": "twitter", "message": "test"}],
"copies": [{"id": "fff", "type": "Draft"}]
}
}
-
Fork the Public Postman Collection: Access and fork the public Postman collection from Allen Helton's Public Workspace.
-
Run the Collection: Execute the collection to create a mock server based on your API spec, enabling immediate frontend development.
- This tool is a proof of concept designed to demonstrate the feasibility of AI-assisted API development.
- The project is open for further enhancements and contributions.
For support and contributions, please refer to the GitHub repository or contact the maintainer.
Happy coding and enjoy the accelerated development process! 🚀👨💻👩💻