Skip to content

Go REST API project built with the Fiber framework.

Notifications You must be signed in to change notification settings

landry-some/fiber-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fiber-proto

fiber-proto is a Go REST API project built with the Fiber framework.
It demonstrates a structured backend architecture with routing, handlers, models, database integration (MongoDB), and Swagger documentation support.

The project includes a simple CRUD example (e.g., Todo API) and is structured for scalability and maintainability.


Features

  • REST API built with Fiber
  • Structured project layout (app, handlers, models, router)
  • MongoDB integration
  • Environment-based configuration
  • Swagger documentation support
  • Makefile for development tasks
  • CRUD example implementation

Project Structure

  • main.go – Application entry point
  • app/ – Application bootstrap and initialization
  • router/ – Route definitions
  • handlers/ – HTTP handlers
  • models/ – Data models
  • database/ – Database connection logic
  • config/ – Configuration management
  • docs/ – Swagger/OpenAPI documentation

Requirements

  • Go 1.20+
  • MongoDB
  • Make (optional)

Setup

1. Clone the repository

git clone https://github.com/<your-username>/fiber-proto.git
cd fiber-proto

2. Configure Environment

Copy the example environment file:

cp .env.example .env

Edit .env with your MongoDB connection string and other configuration values.


Run the Application

Download dependencies:

go mod download

Start the server:

go run main.go

Or use Makefile (if configured):

make run

API Documentation

If Swagger is configured, documentation will be available at:

http://localhost:PORT/swagger/index.html

(Adjust PORT according to your configuration.)


Example Endpoints

Example CRUD routes (e.g., Todos):

  • GET /todos
  • GET /todos/:id
  • POST /todos
  • PUT /todos/:id
  • DELETE /todos/:id

Development

Build:

go build

Format:

go fmt ./...

About

Go REST API project built with the Fiber framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published