Giter VIP home page Giter VIP logo

newsfeed's Introduction

Newsfeed Website

This is a newsfeed website with a fully decoupled frontend and backend. The frontend which is stored in frontend is a React app written in JavaScript. The backend which is stored in backend is written in Python using the FastAPI library.

Current state of the App

Here are the current features of the app:

  • User sign up and logins
  • Ability for user to create articles
  • Ability to see lists of posts and read individual articles
  • Can like and favorite article if logged in

Future TODO items:

  • Commenting on articles
  • Need to be able to see if article is liked or favorited if logged in
  • Profile page to see likes and favorites
  • Ability to edit individual articles
  • Ability to delete articles

Notes on Development

Note #1: On my local environment there is a virtual environment located at /newsfeed/backend/.venv. This is where the various libraries are installed including: pydantic, fastapi, and sqlalchemy.

Note #2: This plugin is being used in VSCode to view and edit the database: SQLite3 Editor

The database is located at /backend/database/newsfeed.sqlite

Note #3: The logic for logins and authentication on the Python side mainly came from here: OAuth2 with Password (and hashing), Bearer with JWT tokens

Note #4: Frontend is using Zustand for state management. Not particularly clear if having a store is necessary for this web app. Additionally, user auth token is being persisted in "localStorage" which is a security flaw.

Note #5: Need to look into keeping access and refresh tokens in HttpOnly cookies to close come security holes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies

**Update: figured out HttpOnly cookies, slowly switching to that for using that as the access_token from logged in users

newsfeed's People

Contributors

dependabot[bot] avatar mccarrion avatar

Stargazers

 avatar  avatar  avatar

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.