Instagram Clone RESTful API with Go
Final project for Scalable Web Service with Golang Course - DTS Kominfo X hacktiv8id
# Download this project
go get github.com/husfuu/go-gram
Before running the API server, you must set up the database configuration with yours by creating an .env
file. You can see the environment variables used in this project in the .env.example
file in this repository.
Then follow this steps:
# Build and Run
cd go-gram
go build
./go-gram
go-gram
├── auth
├── config // database connection and migration
├── dto // request and response schema and put some validation
│ ├── comment-dto.go
│ ├── photo-dto.go
│ └── ...
├── entity // schemas of database table
│ ├── comment
│ ├── photo
│ └── ...
├── handler // payload process from frontend
│ ├── commentHandler
│ │ └── comment-handler.go
│ ├── photoHandler
│ │ └── photo-handler.go
│ └── ...
├── helper
│ ├── constant.go
│ └── ...
├── middleware
│ └── authorization.go
├── repository // query process to interact to database
│ ├── commentRepository
│ │ └── comment-repository.go
│ └── ...
├── server
│ ├── route.go
│ └── server.go
├── service // implement business logic
│ ├── commentService
│ │ └── comment-service.go
│ └── ...
└── validation
├── comment-validation.go
├── photo-validation.go
└── ...
- Database seeding
- Http Test
- API Doc
- Implement soft delete