Giter Site home page Giter Site logo

repost-fastapi's People

Contributors

espenk avatar jonsondrem avatar pckv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

repost-fastapi's Issues

Create resub endpoint (basic)

/resubs

Public schema:

  • name
  • description
  • owner
  • list of posts

Features:

  • create a resub
  • owner can delete the resub
  • owner can transfer ownership
  • owner can modify description
  • owner can delete the resub

Create users endpoint (basic)

/users

Public schema:

  • username
  • bio/description
  • avatar* (as external url)
  • list over owned resubs
  • list over posts by the user
  • list over comments by the user

Features:

  • get user by username
  • create user (register account)
  • update authorized user's username/avatar/bio
  • delete authorized user

Avoid using external dependencies

Currently, we are using starlette's status fields. This means that starlette is a dependency and should be in requirements.txt (if FastAPI stops using starlette at some point, it would be incompatible). FastAPI has its own status, so we should be using that.

Same for any others that we may be using. PyCharm will show where these are.

(this is not actually required for our project, but it would be a good consideration for a project with a longer lifespan)

Create comments endpoint (basic)

/resubs/{resub}/posts/{post}/comments

Public schema:

  • id
  • parent post (relation)
  • content
  • author
  • timestamp created
  • timestamp edited
  • votes

Features:

  • get comments in a post
  • create a comment in a post
  • author can delete their comment
  • resub owner can delete any comment
  • author can edit the content
  • vote on comment {id}/vote
  • reply to another comment /{id}/reply

Database model and CRUD for resubs table

Model should for the most part reflect the API schema. Models should be in repost.models.resubs, and CRUD functions should be in repost.crud.resubs.

Further discussion must be made to decide columns: discussion in Discord.

Database model and CRUD for users table

Model should for the most part reflect the API schema. Models should be in repost.models.users, and CRUD functions should be in repost.crud.users.

Further discussion must be made to decide columns: discussion in Discord.

Allow CORS with localhost

For there to be communication between front-end and back-end, CORS has to be allowed for localhost with the port 63342. (Port may be changed later)

Create posts endpoint (basic)

/resubs/{resub}/posts

Public schema:

  • id
  • parent resub (relation)
  • title
  • url
  • content
  • author
  • timestamp created
  • timestamp edited (may be null)
  • list of comments
  • votes (as number)

a post requires at least one of url, content

Features:

  • create a new post in a resub
  • get all posts in resub
  • post author can delete their post
  • resub owner can delete any post in their resub
  • post author can edit title/description/url
  • vote on post

Database model and CRUD for posts table

Model should for the most part reflect the API schema. Models should be in repost.models.posts, and CRUD functions should be in repost.crud.posts.

Further discussion must be made to decide columns: discussion in Discord.

Implement PostgreSQL database driver

This should probably be defined in repost.database. Tables don't need to be modelled yet, but the database should be able to be accessed from a future CRUD setup.

Database model and CRUD for comments table

Model should for the most part reflect the API schema. Models should be in repost.models.comments, and CRUD functions should be in repost.crud.comments.

Further discussion must be made to decide columns: discussion in Discord.

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.