Skip to content

Latest commit

 

History

History
82 lines (76 loc) · 3.37 KB

TODO.md

File metadata and controls

82 lines (76 loc) · 3.37 KB

TODO

  • Flat config folder
  • Place config folder inside internal
  • Rename from migration to migrations
  • Define Logging Strategy
  • Search about ctx wrapper
  • Send ctx context.Context in all functions
  • Flat auth folder
  • Flat catalog folder
  • Flat shop folder
  • Add validation to usecase layer
  • Add Authorization to usecase layer (and add userId to shop layer)
  • Double check requests/responses function names looking for inconsistencies
  • Create a Route Wrapper
  • Create Errors Middleware
  • Refactor Errors Middleware
  • Create Swagger Middleware
  • Make the code compile again / Refactor Wire
  • Use pointers type for DI
  • Fix Swagger Endpoint
  • Place docs folder in root directory
  • Remove admin middleware
  • Replace c.Request.Context() with just c
  • Refactor migrations folder
  • Add health-check
  • Review tests (Noticing Naming, Pointer, files that are not tested, check coverage)
  • Create a repository testsuite
  • Add Logging, Observability
  • Review Swagger Documentation
  • Review errors (Update Server Error Mapping)
  • Reduce number of multi-argument functions
  • Review pointer/concrete types in struct and as receivers (tests included)
  • Find a way to separate unit and integration tests while keeping good autocompletion
  • Document Public API (Maybe autogenerate documentation)
  • Try to use context.Context in Stripe
  • Test app manually (Save final postman collection somewhere)
  • Make test pass (Also remove user_factory)
  • Create Seed Script
  • Refactor makefile
  • Update README.md
  • Add golangci-lint
  • Add error wrapping
  • Implement graceful shutdown
  • Change module path to just github.com/ebookstore
  • Add Rate Limiting Middleware
  • Add Core and Platform folders
  • Add Version API
  • Add CORS Middleware
  • Allow a single a book to have multiple images instead of only one
  • Use the S3 Presigning API to send book content to the user instead of downloading the file in the server
  • Validate Data Size in All Requests
  • Add INFO Logging in important places
  • Protect code against SQL Injection
  • Improve test suite, use apitest for the HTTP handlers (Add more catalog tests and add shop tests)
  • Close DB in Sever Shutdown
  • Organize TODO for next iteration

Features

  • Create Shopping Cart Functionality
  • Add a position field to the image table
  • Add ability to specify mime type in the request when creating a presigned url

Refactoring

  • Use mocks in the same package
  • Refactor Logging (use function log(ctx, msg, fields))

Architecture Improvements

  • Try to implement Query Pattern to decouple domain from Database specific technologies
  • Implement Unit of Work Pattern for transactional use cases
  • Move Request/Response to server package and implement the CQRS Pattern
  • Use one use case per file approach
  • Implement Auth using OAuth2 Specification
  • Use an anti-corruption layer to handle the Stripe Webhook in a better way

Dev Experience

  • Create a new script for cleaning data
  • Use Stripe CLI in local environment (include instructions in the README.md)

Deploy

  • Add Github Actions capabilities
  • Create prod Dockerfile and deploy folder/script