Skip to content

πŸš€ Build robust REST APIs with this Go boilerplate. Fast setup, clean code, and production-ready features ensure a smooth development experience.

License

Notifications You must be signed in to change notification settings

dricce3000/go-rest-api-boilerplate

Repository files navigation

πŸš€ go-rest-api-boilerplate - Easy Setup for Your API Project

Download

πŸš€ Getting Started

Welcome to the go-rest-api-boilerplate! This project provides a simple way to build a REST API using Go. It includes important features like JWT authentication, PostgreSQL support, and Docker hot-reload. Whether you're looking to create a production-level API or just want to learn Go, this template is for you.

πŸ“₯ Download & Install

To get the application, visit this page to download: GitHub Releases.

🌐 System Requirements

Before you begin, make sure your system meets these requirements:

  • Operating System: Windows, macOS, or Linux
  • Docker: Installed to run the application smoothly
  • PostgreSQL: A version compatible with the application (Check the PostgreSQL website for installation guides)
  • Basic Command Line Knowledge: Ability to run commands in your terminal

βš™οΈ How to Run the Application

Step 1: Download the Application

  1. Go to the GitHub Releases.
  2. Find the latest version.
  3. Click on the downloaded file suitable for your operating system.

Step 2: Extract the Files

After downloading, extract the contents of the ZIP file to a folder on your computer.

Step 3: Setting Up PostgreSQL

  1. Install PostgreSQL if you haven't done so already.
  2. Create a new database for your API.
  3. Update the database connection settings in the application configuration file located in the extracted folder.

Step 4: Run the Application Using Docker

  1. Open your command line interface.

  2. Change to the directory where you extracted the files.

  3. Use the following command to start the application:

    docker-compose up
  4. You should see logs in your terminal indicating your application is running.

Step 5: Access the API

Once the application is running, you can access it in your web browser or via tools like Postman. The standard endpoint will be:

http://localhost:8080/api

πŸ“œ Features of go-rest-api-boilerplate

  • JWT Authentication: Secure your API with token-based authentication.
  • PostgreSQL Integration: Easily connect your application to a PostgreSQL database.
  • Clean Architecture: Follow best practices in structuring your code.
  • Docker Support: Quickly run your application in a containerized environment.
  • Swagger Documentation: Access automatic API docs for easy reference.
  • Tests and CI/CD: Built-in testing features and continuous integration for deployment.

πŸ› οΈ Additional Configuration

You may want to customize some settings. Look for configuration files in the project folder. Here are key aspects you might adjust:

  • Database Configuration: Change database name, user, and password as per your PostgreSQL setup.
  • API Ports: Adjust the API listen port in case of conflicts.
  • Swagger Settings: Modify documentation details to match your API.

πŸ“š Documentation

For detailed information on each feature and how to use them, check the documentation folder included in the project. It will guide you through various aspects of this application.

πŸŽ“ Learning Resources

If you're new to Go or API development, consider exploring these learning resources:

  • Go Documentation: The official Go site has a wealth of information for beginners.
  • REST API Guide: Understanding REST essentials will help you grasp API concepts better.
  • Docker Overview: Familiarize yourself with Docker basics for smoother operation.

πŸŽ‰ Support

If you encounter issues or have questions, check the FAQ section in the documentation, or reach out via the project's GitHub Issues page.

πŸ“’ Contributing

Contributions are welcome! If you'd like to submit changes, please refer to the guidelines in the documentation to maintain code quality.

πŸ”— Links

  • GitHub Releases - For downloading the latest version.
  • PostgreSQL - Official PostgreSQL website for any database-related setups.
  • Docker - Get Docker here to run the application easily.

We hope this application helps you kickstart your API development journey!

About

πŸš€ Build robust REST APIs with this Go boilerplate. Fast setup, clean code, and production-ready features ensure a smooth development experience.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14