Event Planning BackEnd Api for Klender App
Event Planning App adalah sebuah aplikasi yang digunakan untuk membuat dan management sebuah event.
Membuat API menggunakan bahasa Go dengan menerapkan layered architecture untuk memudahkan pemeliharaan dan peningkatan Fitur
Acknowledgements
Tech Stack
- Go Language
- Labstack Echo
- Mysql
- Docker
Features
- Bcrypt
- JWT
- GraphQL
- CRUD User
- CRUD Event
- Join/Going Event
- Post and Read Comment
Queries and Mutations
User
- How register a new user
mutation {
createUser(
input: {
name: String!
email: String!
password: String!
phoneNumber: String
avatar: String
}
) {
id: Int
name: String!
email: String!
password: String!
phoneNumber: String
avatar: String
}
}
// example request body
mutation {
createUser(
input: {
name: "Bagus Brahmantya"
email: "[email protected]"
password: "qwerty1234"
}
) {
id
name
}
}
// example success response
{
"data": {
"id": 1
"name": "Bagus Brahmantya"
}
}
- How registered user login
query {
authLogin(
email: String!
password: String!
) {
message: String!
id: Int!
name: String!
email: String!
token: String!
}
}
// example request body
query {
authLogin(
email: "[email protected]"
password: "qwerty1234"
) {
id
name
token
}
}
// example success response
{
"data": {
"id": 1
"name": "Bagus Brahmantya"
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE2NDI1ODE0OTAsImlkIjoxLCJuYW1lIjoiIn0.NW5sOrXy_h9R1LovaarufA-anCJ14QAIwrzYLirkQdQ"
}
}
Authors
Environment Variables
To run this project, you will need to set up the following environment variables to your ./config/config.go file
defaultConfig.Port
defaultConfig.Database.Driver
defaultConfig.Database.Name
defaultConfig.Database.Address
defaultConfig.Database.Port
defaultConfig.Database.Username
defaultConfig.Database.Password
Run Locally
Clone the project
git clone https://github.com/najibjodiansyah/eventapp.git
Go to the project directory
cd eventapp
Install dependencies
go mod tidy
Start the server
go run ./app/main.go
Running Tests
To run tests, run the following command
go test ./...
Used By
This project is used by the following companies:
- Group 5 Projet Event Planning App : Klender
Lessons Learned
What did you learn while building this project? What challenges did you face and how did you overcome them?
Feedback
If you have any feedback, please reach out to us at [email protected]
Support
For support, email [email protected] or join our Discord channel.