https://github.com/samiraafrin/to-do-app
It is a todo app built using Golang. CRUD operations are implemented following clean-architecture. Here, echo framework and mysql is used for the execution of the app.
https://github.com/samiraafrin/to-do-app
clean-architecture database dockerfile e2e-testing echo-framework go golang gorm gorm-orm integration-testing mysql mysql-database todo-app unit-testing
Last synced: about 2 months ago
JSON representation
It is a todo app built using Golang. CRUD operations are implemented following clean-architecture. Here, echo framework and mysql is used for the execution of the app.
- Host: GitHub
- URL: https://github.com/samiraafrin/to-do-app
- Owner: SamiraAfrin
- Created: 2023-02-09T06:33:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-29T05:57:27.000Z (about 3 years ago)
- Last Synced: 2025-10-07T02:50:59.575Z (9 months ago)
- Topics: clean-architecture, database, dockerfile, e2e-testing, echo-framework, go, golang, gorm, gorm-orm, integration-testing, mysql, mysql-database, todo-app, unit-testing
- Language: Go
- Homepage:
- Size: 37.8 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Description
It is a todo app built using Golang. CRUD operations are implemented following clean-architecture. Here, echo framework and mysql is used for the execution of the app.
# Layers
This project has 4 layers :
* Models Layer
* Repository Layer
* Usecase Layer
* Delivery Layer
# How to run the project
#### Here is the steps to run it with ```docker-compose```
```
#move to directory
$ cd workspace
# Clone into your workspace
$ git clone https://github.com/SamiraAfrin/To-Do-App.git
#move to project
$ cd To-Do-App
# Run the application
$ docker compose up -d mysql adminer
$ docker compose up web - - build
```
# Database
### If the database is empty, database can be updated using two ways
## Way 1
```
From the adminer GUI
# In the browser, type
- localhost:8080
# Fill the fields using the following credentials
- System --> MySQL
- Server --> mysql
- Username --> root
- Password --> 123
- Database --> recordings
# Update the database
- SQL commands are provided in the database.sql file
```
## Way 2
```
From the container terminal
# To be in the container terminal
$ docker exec -it mysql container id bash
$ To connect mysql server
$ mysql -u root -h localhost --protocol tcp -P 3306 -p
$ Passwords ? --> 123
# Update the database
- SQL commands are provided in the database.sql file
```
# API
## Way 1
```
#move to project
$ cd To-Do-App
#Execute the call in another terminal
$ curl localhost:8000/tasks
```
## Way 2
```
# Postman might be a good option
# choose the http method
- Example: Choose GET method
# In the url section,type, localhost:8000/endpoint
- Example: localhost:8000/tasks
# All the api patterns are mentioned in the following path
- To-Do-App/Task/delivery/http/task_handler.go
```