Skip to content

omarnazih/NewFeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c48f8d9 · Dec 2, 2023

History

23 Commits
Dec 2, 2023
Dec 2, 2023
Dec 1, 2023
Dec 1, 2023
Dec 1, 2023
Dec 2, 2023
Dec 1, 2023
Dec 2, 2023
Dec 2, 2023
Dec 1, 2023
Dec 1, 2023
Dec 1, 2023
Dec 2, 2023

Repository files navigation

NewFeed Microservice

This project is a simple microservice using Flask for a social media application with basic entities: User, Post, Comment, Like, Share, and Follow/Friendships.

Table of Contents

Requirements

The main focus of the business is to create a simple newsfeed app with the following entities:

  1. User
  2. Post
  3. Comment
  4. Like
  5. Share
  6. Follow/Friendships

ERD Diagram

ERD Diagram Screenshot

SQL Implementation

script.sql

Python Microservice with Flask

Usage

Follow these steps to set up and run the microservice:

Prerequisites

  • Python >= 3.8
  • Docker installed (for mysql db)
  • Git installed

Getting Started

  1. Clone the repository:

    git clone https://github.com/omarnazih/NewFeed.git
    cd NewFeed
  2. Create and Activate virtual environment

    python -m venv .venv
    .\.venv\Scripts\activate
  3. Install requirements.txt

    pip install -r requirements.txt
  4. Build and run the Docker containers to run mysql db:

    docker-compose up --build

    This will launch the MySQL db. Ensure that your Docker daemon is running.

  5. Run Flask service

    flask run
  6. The microservice should be running at http://localhost:5000. You can now use the provided endpoints.

  7. Swagger Documentation should also be available at http://localhost:5000/swagger-ui

  8. To stop the containers, press Ctrl + C in the terminal where Docker is running, or run:

    docker-compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages