https://github.com/krittakondev/goapisuit
goapisuit is a powerful and efficient framework built for Golang developers to speed up API development. Inspired by Laravel, goapisuit focuses on simplifying the process of creating and managing APIs while providing tools to handle database operations easily.
https://github.com/krittakondev/goapisuit
api cli crud database framework go goapisuit golang golang-framework laravel laravel-framework midleware open-source orm rest rest-api template template-engine web-development
Last synced: 9 months ago
JSON representation
goapisuit is a powerful and efficient framework built for Golang developers to speed up API development. Inspired by Laravel, goapisuit focuses on simplifying the process of creating and managing APIs while providing tools to handle database operations easily.
- Host: GitHub
- URL: https://github.com/krittakondev/goapisuit
- Owner: krittakondev
- License: mit
- Created: 2024-08-28T12:10:36.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-16T22:40:53.000Z (over 1 year ago)
- Last Synced: 2025-02-08T01:36:27.955Z (over 1 year ago)
- Topics: api, cli, crud, database, framework, go, goapisuit, golang, golang-framework, laravel, laravel-framework, midleware, open-source, orm, rest, rest-api, template, template-engine, web-development
- Language: Go
- Homepage:
- Size: 1.67 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/krittakondev/goapisuit)
# goapisuit
[](https://pkg.go.dev/github.com/krittakondev/goapisuit)
**goapisuit** is a lightweight and easy-to-use Golang framework that simplifies API creation and database management using GoFiber. It aims to accelerate the development of APIs by providing built-in commands for generating models, routers, and handling database migrations.
## Features
- **Fast API Creation**: Automatically generate routes and models.
- **Database Management**: Seamlessly handle migrations with built-in commands.
- **GoFiber Integration**: Utilize the powerful and efficient GoFiber web framework.
## Getting Started
### Prerequisites
To use goapisuit, you need the following installed:
- [Golang](https://golang.org/dl/)
- A relational database (e.g., MySQL etc.)
- Git for cloning the repository
### Installation
1. Install CLI `heykrit` for the `goapisuit`:
```bash
go install -v github.com/krittakondev/goapisuit/cmd/heykrit@latest
```
2. Make your project:
```bash
mkdir nameproject
cd nameproject
go mod init you/projectpath
heykrit init
```
3. Config your project in `.env`
4. Run your project:
```bash
go run cmd/server.go
```
### Directory Structure
Here's a brief overview of the generated directory structure:
```
nameproject/
├── cmd/
│ └── server.go # Entry point of your project
├── internal/
│ ├── models/ # Contains your data models (e.g., user.go)
│ └── routes/ # Contains API route handlers
├── public/ # Directory for static files (e.g., CSS, JavaScript, images)
├── go.mod
└── go.sum
└── .env # config project
```
## Usage
Once the setup is complete, you can build upon this project by adding new models and routes using the provided commands. For example, to create a new module for handling products:
1. Generate a new `product` Route and Model:
```bash
heykrit make product
```
Generate 2 files `internal/routes/Product.go` and `internal/models/Product.go`
2. Modify the generated `internal/models/Product.go` model as needed, and then apply the migration (gorm model):
```bash
heykrit db:migrate product
```
3. Run server:
```bash
go run cmd/server.go
```
## Contributing
If you'd like to contribute to `goapisuit`, feel free to open a pull request or issue on the [GitHub repository](https://github.com/krittakondev/goapisuit).
## License
This project is licensed under the MIT License.
## Credits
[](https://gofiber.io/)A web framework that brings lightning-fast performance to your Golang applications.
[](https://gorm.io/)
A powerful ORM library for Golang, simplifying database handling and migrations.