Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

.idea
### VS Code ###
.vscode/
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,37 @@
- We have **collaborative** culture at Manabie. Feel free to ask trieu@manabie.com any questions. We are very happy to answer all of them.

Thank you for spending time to read and attempt our take-home assessment. We are looking forward to your submission.

-------------------------------------------------------------------------------------------------------------------
1. Download and install Git bash

2. Clone repository https://github.com/bernardcvu/togo.git

3. Build application using below command:
./gradlew bootRun

4. Hit http://localhost:7000/. You'll be greeted with a rather dull error message, but you're up and running alright!

Test the application:

5. Add items with below command:

curl -X POST -H "Content-Type:application/json" -d "{\"userId\":\"bernard\", \"taskName\":\"Create\", \"taskDescription\":\"Create Record\"}" http://localhost:7000/api/tasks/todo -i

curl -X POST -H "Content-Type:application/json" -d "{\"userId\":\"bernard\", \"taskName\":\"Retrieve\", \"taskDescription\":\"Retrieve Record\"}" http://localhost:7000/api/tasks/todo -i

curl -X POST -H "Content-Type:application/json" -d "{\"userId\":\"bernard\", \"taskName\":\"Update\", \"taskDescription\":\"Update Record\"}" http://localhost:7000/api/tasks/todo -i

curl -X POST -H "Content-Type:application/json" -d "{\"userId\":\"bernard\", \"taskName\":\"Delete\", \"taskDescription\":\"Delete Record\"}" http://localhost:7000/api/tasks/todo -i

#7. Get all items:
#curl http://localhost:7000/api/tasks/todo -i

8. Get item/s:
curl http://localhost:7000/api/tasks/todo/?userId=bernard&date=24-07-2022 -i

9. Delete an item:
curl -X DELETE http://localhost:7000/api/tasks/todo/{userId} -i

#10. Update an item:
#curl -X PUT -H "Content-Type:application/json" -d "{\"userId\":\"bernard\", \"taskName\":\"Test Update\", \"taskDescription\":\"Test Update\"}" http://localhost:7000/api/tasks/todo/{userId} -i
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
id 'org.springframework.boot' version '2.7.2'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'java'
}

group = 'com.tasks'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.data:spring-data-keyvalue'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
240 changes: 240 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading