A simple movie watchlist tracker backend built using the Gin framework and SQLite as the database.
-
- Install Go (version >= 1.23.3): https://golang.org/dl/
- API Testing Tool
I am using HttPie for API testing you can use any tool as per your requirement and
curlis fine too :D
Important
I am using WSL (Ubuntu).
- Clone the repository:
git clone https://github.com/saketv8/cine-dots.git- Navigate to the project directory:
cd cine-dots- Install dependencies:
go mod download- Generate Database with some default data:
Important
OPTIONAL STEP as I have already included the cine_dots.db
delete the cine_dots.db in DB/cine_dots.db and use below command to generate new one
go run migrations/migration.go- Building the Application Binary:
go build -o cine-dots- Starting the Application:
./cine-dotsTip
Now you can Access Swagger at Swagger UI
🚀 You're all set!
| Method | Endpoint | Description |
|---|---|---|
| GET | http://localhost:9090/api/v1/watchlist/watched |
Get watched items |
| GET | http://localhost:9090/api/v1/watchlist/watching |
Get currently watching items |
| GET | http://localhost:9090/api/v1/watchlist/all |
Get all items in the watchlist |
| GET | http://localhost:9090/api/v1/watchlist/notwatched |
Get items not yet watched |
| GET | http://localhost:9090/api/v1/watchlist/:watchlist_id |
Get details of a specific watchlist by ID |
| POST | http://localhost:9090/api/v1/watchlist/add |
Add a new item to the watchlist |
| DELETE | http://localhost:9090/api/v1/watchlist/delete |
Delete an item from the watchlist |
| PATCH | http://localhost:9090/api/v1/watchlist/update |
Update an item in the watchlist |
| ==== | ============================================== |
========================= |
| GET | http://localhost:9090/swagger/index.html |
Acess Swagger UI |
Important
Add these json value as body while making request
body of the request
{
"title": "Coco",
"release_year": 2017,
"genre": "Animation",
"director": "Lee Unkrich",
"status": "not watched",
"added_date": "2025-06-20T00:00:00Z"
}body of the request
{
"watchlist_id": 6
}body of the request
{
"watchlist_id": 7,
"title": "Coco",
"release_year": 2017,
"genre": "Animation",
"director": "Lee Unkrich",
"status": "watching"
}Note
🌸 Assignment - 3
To run all tests:
go test ./tests/...To run tests with verbose output:
go test -v ./tests/...Step-1: To generate a coverage report:
go test -v -coverpkg=./pkg/handlers,./pkg/repositories ./tests/... -coverprofile=coverage.outStep-2: To view a coverage summary in the terminal:
go tool cover -func=coverage.outStep-3: To view a detailed HTML report:
go tool cover -html=coverage.out -o coverage.html Important
After generating the coverage.html file open it in browser to view the report
Note
🌸 Assignment - 4
OpenAPI/Swagger ☑️
CI/CD using github workflow ☑️
Keploy Integration ☑️
Tip
Access Swagger at Swagger UI
Keploy Test Suite (Keploy Dashboard)
Keploy Test Suite (CLI)
- Show All WatchList
- Get Particular WatchList By ID
- Add New WatchList Data
- Delete WatchList Data
- Update WatchList Data
- Add Test
- Add Swagger/OpenAPI
- Add Keploy Test Suite
- Integrate CI/CD using github workflow with keploy test integration
- Web Application for this API (NextJS/Vite-React)
This project was created as an assignment for Keploy's API Fellowship Sessions.









