GithubHelp home page GithubHelp logo

devbook_api's Introduction

Hi there. Welcome to my profile!


My current tech stack, in case you are wondering


Go Kafka K8s Docker Linux AWS

devbook_api's People

Contributors

anlsergio avatar

Stargazers

 avatar

Watchers

 avatar

devbook_api's Issues

Include Unit tests

Enable this project to be more consistent and reliable by making unit tests.

API server

Research out there (documentation, forums) if the ListenAndServe function from the http package is actually ideal for production use cases or if it's only suitable for development purposes.

If the latter is the case, implement a better way of serving the API (Nginx for instance).

CI pipeline

Implement a CI pipeline responsible for the following tasks:

  • Trigger a CI pipeline for every commit pushed to the remote repository (decide the best way to handle the deliverables according to the approach being used: Release branches, Trunk Based Development, ... );
  • Build a deployable artifact from this repository;
  • Run tests;
  • Expose the ready artifacts (DockerHUB, release packages, ECR, ...);
  • Generate release tags on Github along with the compiled packages;
  • Generate CI status flags on Readme.md.

Containerize the API

As a further step for this application, it would be great if it's containerized and suitable for Kubernetes deployment, so it can be easily tested, built, shipped, and deployed.

Make number of Likes limited to user x post relationship

The "LikePost" feature allows a single user to add likes to a single post as much as he pleases, so it requires a more complex structure in order to ensure that a post can only be liked once by a single user.

Suggestion:

  • Database: The database requires another table to store Users' foreign keys and Posts' foreign keys in order to create an N x N relationship between Users and Posts (this makes it possible also to add more fancy features like fetching a list of the users that currently like the post);
  • Code: Additional logic must be put in place to validate if a given post is already liked by a given user;
  • Unlike: Of course the "UnlikePost" feature should have the same approach applied so that a single user isn't able to indefinitely unlike a post.

Disclaimer: it's not flagged as a bug because it was thought to be simple initially but it's a great enhancement suggestion for the future.

User x Likes x Posts relationship

Keep track of users who liked a given post so other features can be implemented such as:

  • List of users who like a post;
  • Frontend validation improvement when it comes to rendering the "Like" button (Like|Dislike)

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.