Giter VIP home page Giter VIP logo

realworld-elixir's Introduction

An Nyeong

  • interests: Web backend engineering, development environments, keyboards, etc.
  • languages: Korean(원어민), English(broken), Japanese(少し), Esperanto(iomete).
  • programming languages: Elixir(learning), Rust(learning).
  • blog/second-brain: hanassig.

Repos

  • hanassig: notes about what I've learned. (ko)
  • .dotfiles: configuration files for my development environments. (zsh, editor, git, etc)
  • nth-week-today: a website presenting the week number. (ko)
  • realworld-elixir: blog clone coding project.
  • playground: code snippets for problem-solving or proof of concepts.

realworld-elixir's People

Contributors

nyeong avatar

Watchers

 avatar

realworld-elixir's Issues

Design database schemas

Entity

  • User
  • Article
  • Comment
  • Tag

Attributes

  • User: email, password, username, bio, image, written_articles, followed_by, following, comments, favorites
    • email should be unique (users authenticate with an email)
    • username should be unique (profiles API queries a user by given username)
  • Article: title, description, body, tag, author, slug, comments, favorites_count, created_at, updated_at
  • Comment: created_at, updated_at, body, author
  • Tag: name

Relationships

  • User <-> User (follow)
  • User |-> Article (write)
  • User |-> Comment (write)
  • User <-> Article (add to favorite)
  • Article |-> Comment (be commented on)
  • Article <-> Tag (tagged)
  • <-> means N:N relationship.
  • |-> means 1:N relationship.

Oh no

I don't know the differences between the User entity and the Profile entity1.

I think it's OK to store those on the same table because they deal with the same topic, the User. To present those on different APIs might be enough.

Footnotes

  1. https://www.realworld.how/docs/specs/backend-specs/api-response-format

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.