GHEPA (Golang Hexagonal Event Planning App) is an event planning application built using the Go (Golang) programming language with a hexagonal architecture approach. This application is designed to assist users in planning, creating, and managing their events easily and efficiently.
├── cmd
│ └── main.go
├── config
│ └── config.go
├── docker-compose.yml
├── Dockerfile
├── go.mod
├── go.sum
├── internal
│ ├── adapter
│ │ ├── handler
│ │ │ ├── comment.go
│ │ │ ├── event.go
│ │ │ └── user.go
│ │ └── repository
│ │ ├── comment.go
│ │ ├── event.go
│ │ └── user.go
│ ├── core
│ │ ├── domain
│ │ │ ├── claims.go
│ │ │ ├── comment.go
│ │ │ ├── event.go
│ │ │ ├── participant.go
│ │ │ ├── response.go
│ │ │ └── user.go
│ │ ├── port
│ │ │ ├── comment.go
│ │ │ ├── event.go
│ │ │ ├── response.go
│ │ │ └── user.go
│ │ └── service
│ │ ├── comment.go
│ │ ├── event.go
│ │ └── user.go
│ ├── middleware
│ │ └── auth.go
│ ├── route
│ │ └── route.go
│ └── util
│ ├── bcrypt.go
│ ├── jwt.go
│ ├── response.go
│ └── validate.go
└── README.md
-
Clone this repository
git clone <repository URL>
-
Navigate to the project directory
cd ghepa
-
Copy or rename
.env.example
to.env
-
Install dependencies
go mod tidy
-
First, navigate to the cmd directory:
cd cmd
-
Next, run the main.go file:
go run main.go
-
Install Docker Compose by running the following command (for Linux):
sudo apt install docker-compose -y
-
After installing Docker Compose, navigate to the root directory of the project and run the following command to start the application in detached mode:
docker-compose up -d
Method | Url | Description |
---|---|---|
POST |
/api/v1/auth/login |
Login account. |
POST |
/api/v1/auth/register |
Create an account. |
Method | Url | Description |
---|---|---|
GET |
/api/v1/user |
Get all user data. |
GET |
/api/v1/user/{id} |
Get user data by ID. |
PUT |
/api/v1/user/{id} |
Update user data by ID. |
DELETE |
/api/v1/user/{id} |
Delete user data by ID. |
Method | Url | Description |
---|---|---|
POST |
/api/v1/event |
Create a new event. |
GET |
/api/v1/event |
Get all events. |
GET |
/api/v1/event/{id} |
Get event details by ID. |
PUT |
/api/v1/event/{id} |
Update event details by ID. |
DELETE |
/api/v1/event/{id} |
Delete event by ID. |
POST |
/api/v1/event/{id}/join |
Join an event by ID. |
Method | Url | Description |
---|---|---|
POST |
/api/v1/comment/{id} |
Create a comment for an event. |
GET |
/api/v1/comment |
Get all comments. |