Coder Social home page Coder Social logo

sheltertech-go's Introduction

sheltertech-go

This repository contains the beginnings of a Golang implementation of https://github.com/ShelterTechSF/askdarcel-api/

Integrate with askdarcel-api and askdarcel-web stack

This repository requires running the docker-compose setup inside https://github.com/ShelterTechSF/askdarcel-api/blob/master/docker-compose.yml

The docker-compose in this repository links to the same docker network askdarcel and connects to the database defined at https://github.com/ShelterTechSF/askdarcel-api/blob/master/docker-compose.yml#L4

To start the server in the docker network connected to the existing askdarcel-web and askdarcel-api services

make run

To test, you just need to provide the v2 path param in front of any existing API route for Rails API.

curl -s localhost:8080/api/v2/categories | jq

Implementation

Currently supports

GET /api/categories
GET /api/categories/{id}
GET /api/categories/subcategories/{id}
GET /api/categories/featured

Compare against Rails API

You can make the same API calls against the Rails API on port 3000 and compare

curl -s localhost:3000/categories | jq 
curl -s localhost:3000/categories/150 | jq 
curl -s localhost:3000/categories/subcategories/150 | jq 
curl -s localhost:3000/categories/featured | jq 

sheltertech-go's People

Contributors

lgarofalo avatar dependabot[bot] avatar zen-gineer avatar wkoepcke avatar waynekoepcke avatar

Watchers

 avatar Edward Wang avatar James Cloos avatar Richard Xia avatar Brian Schroer avatar Alex Holden avatar  avatar  avatar Zander Sparrow avatar  avatar

sheltertech-go's Issues

GET /categories/hierarchy

Migrate GET /categories/hierarchy to GO
This endpoint queries the 'categories' table and where top_level=true, a nested query to the 'category-relationships' table finds child categories. The response body is an object with the "categories" prefix, followed by an array of empty slices for categories with no children, and sub-arrays of child objects if they exist, ordered (optionally) by rank.

Complete Categories API Go Implementation

There is a mostly done implementation in the repo currently. We should do these things:

  1. Verify all routes and logic from those different HTTP method have been migrated over. Rout]

Route Definitions
Rails: https://github.com/ShelterTechSF/askdarcel-api/blob/master/config/routes.rb#L7-L13
Go: https://github.com/ShelterTechSF/sheltertech-go/blob/main/cmd/sheltertech-go/main.go#L30-L33

  1. Complete automated tests to cover all those changes

Couple examples here: https://github.com/ShelterTechSF/sheltertech-go/blob/main/cmd/sheltertech-go/integration_test.go

They do require having the DB from the Rails repo running, we may need to chat about that setup.

'Folders' API in Go - Get Folders for User

Acceptance: Route to return all folders (with name and order for the current user)

Design notes: figma

Notes:

  • auth aware
  • object model: schema.rb
  • returned in increasing order number with name
  • endpoint does not need to list all bookmarks per folder

'Folders' API in Go - Delete Folder for User

Acceptance: Route to delete a folder associated with the current user

Design notes: feature requirements

Notes:

  • folders cannot be nested
  • object model: schema.rb

Open Question:

  • do we want to remove all bookmarks in the folder, just move them to be associated with the user (no folder), or give the User the choice between the two?

Work on Bookmarks API in Go

We don't have a technical specification, so part of this task is to also figure out which endpoints we need and how they should be implemented.

See https://docs.google.com/document/d/1XsgVEfRH9zn4XMQlhtqgfhaJAoL8TV8F6yNlLFa2MA4/edit#bookmark=id.qedtweia4g1e for the high level feature requirement, and https://www.figma.com/file/XUttHGa1csIpbSiurbYmjo/Case-Worker?type=design&node-id=7168-4476&mode=design&t=hcGEvgxPwD4YO79c-0 for the Figma Designs.

The main UI interactions are being able to create new bookmarks, create new folders, and reordering bookmarks within folders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.