dianamartisca/SocialMedia-App

Project for FII Practic 2025 training, "Building Python Web Applications with AI Integration and Big Data Analytics", by 3pillar

Python

0

3 commits

updated Jan 30, 2026

See the code

README

📱Social Media App Backend

A modern backend for a social media platform, built with Python & Flask. Features post creation, interaction, and AI-powered sentiment analysis.


🗂️ Features

  • Create, read, update, and delete posts & comments
  • Sentiment analysis for user content (AI-powered)
  • PostgreSQL database integration (via Docker)
  • Unit & integration tests
  • Test coverage reporting

⚡ Quickstart

1️⃣ Set Up Virtual Environment

# Python 3.10 required
python3.10 -m venv .venv

# Activate:
# On MacOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

2️⃣ Start PostgreSQL with Docker

# Start Docker container (from project root)
docker-compose up -d

# Check container is running
docker ps

# Connect to DB
docker exec -it my_postgres psql -U admin -d socialmediadb

(Optional) Test DB Connection

CREATE TABLE test ();
\dt

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run the Flask App

flask run

Test endpoints using Postman or similar tools.

5️⃣ Run Tests & Coverage

# Run a specific test class
python -m unittest tests.integration_tests.test_posts.PostDatabaseIntegrationTestCase

# Run all tests & check coverage
coverage run -m unittest discover
coverage report
coverage html  # Generates htmlcov/index.html

To clean up coverage data:

coverage erase

📁 Project Structure

SocialMedia-App/
├── app.py
├── config.py
├── docker-compose.yml
├── requirements.txt
├── controllers/
├── models/
├── routes/
├── services/
└── tests/

🛠️ Tech Stack

  • Python 3.10
  • Flask
  • PostgreSQL (Docker)
  • Unittest & Coverage

dianamartisca/SocialMedia-App

Project for FII Practic 2025 training, "Building Python Web Applications with AI Integration and Big Data Analytics", by 3pillar

Python

0

3 commits

updated Jan 30, 2026

See the code

README

📱Social Media App Backend

A modern backend for a social media platform, built with Python & Flask. Features post creation, interaction, and AI-powered sentiment analysis.


🗂️ Features

  • Create, read, update, and delete posts & comments
  • Sentiment analysis for user content (AI-powered)
  • PostgreSQL database integration (via Docker)
  • Unit & integration tests
  • Test coverage reporting

⚡ Quickstart

1️⃣ Set Up Virtual Environment

# Python 3.10 required
python3.10 -m venv .venv

# Activate:
# On MacOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

2️⃣ Start PostgreSQL with Docker

# Start Docker container (from project root)
docker-compose up -d

# Check container is running
docker ps

# Connect to DB
docker exec -it my_postgres psql -U admin -d socialmediadb

(Optional) Test DB Connection

CREATE TABLE test ();
\dt

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run the Flask App

flask run

Test endpoints using Postman or similar tools.

5️⃣ Run Tests & Coverage

# Run a specific test class
python -m unittest tests.integration_tests.test_posts.PostDatabaseIntegrationTestCase

# Run all tests & check coverage
coverage run -m unittest discover
coverage report
coverage html  # Generates htmlcov/index.html

To clean up coverage data:

coverage erase

📁 Project Structure

SocialMedia-App/
├── app.py
├── config.py
├── docker-compose.yml
├── requirements.txt
├── controllers/
├── models/
├── routes/
├── services/
└── tests/

🛠️ Tech Stack

  • Python 3.10
  • Flask
  • PostgreSQL (Docker)
  • Unittest & Coverage