Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgarc359/todowheel
Create todos and then randomly receive one
https://github.com/dgarc359/todowheel
Last synced: about 2 months ago
JSON representation
Create todos and then randomly receive one
- Host: GitHub
- URL: https://github.com/dgarc359/todowheel
- Owner: Dgarc359
- Created: 2023-09-14T20:45:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-01T00:55:36.000Z (over 1 year ago)
- Last Synced: 2024-04-23T20:50:08.488Z (9 months ago)
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Why
For when someone has a lot of things they need to do but don't know where to start# Installation
Make sure you have docker desktop installed and running.# Usage
To start up the backend:
```bash
# build a docker container that runs the backend
./dockerfile.sh
```# API specification
All requests should be routed to localhost.
The backend accepts proto payloads OR JSON payloads.
Specify which you want with `application/proto` or `application/json`
respectively in your `Content-Type` header. For the latest proto schemas, please check the `proto` folder and read the `.proto` files. Below is the outline for the required JSON payloads.`/get-health`
**GET**
Returns health of application.`/create-task`
**POST**
Create a task.Request
```ts
{
task_length: number,
task_name: string,
task_id?: number,
}
```Response
```ts
{
status: string,
statusCode: number,
}
````/get-task`
**POST**
Get a task by task nameRequest
```ts
{
task_name: string,
}
```Response
```ts
{
status: string,
statusCode: number,
}
````/get-tasks`
Get a list of tasks. If min / max task length are not provided, then return all tasks.Request
```ts
{
min_task_length: number, // optional
max_task_length: number, // optional
}
```Response
```
{
status: string,
statusCode: number,
Data: { id: string, task_name: string, task_length: number }[]
}
````/spin`
returns a single todo based on optional min / max task length. If no min / max task length provided, then use it picks a random todo from all available todosRequest
```ts
{
min_task_length: number,
max_task_length: number,
}
```Response
```
{
status: string,
statusCode: number,
Data: { id: string, task_name: string, task_length: number }
}
```# Features
* Set an estimated length for task
* Spin a wheel to pick a task
* You can set a minimum / maximum task length so that you can say, 'I wanna do something that will take me 5 minutes'# Technical Requirements for MVP #1
* Docker
* Go
* Protobuf
* Roulette app is dockerized and exposes either an API or something else to interface with a frontend