Synk is a modern social media platform designed for posting, following users, commenting, and community interaction. The backend is built with Python (FastAPI + SQLAlchemy), and the frontend uses Flask (Jinja2), HTML, CSS, and JavaScript.
- Post publication: create, view, and delete posts.
- Comments: add, view, edit, and delete comments on posts.
- Registration & authentication: secure registration/login system using JWT (OAuth2).
- User profiles: view profile, bio, follower count.
- Subscriptions: follow/unfollow users.
- Search: search content and users.
- Light/dark theme: theme switcher for a comfortable experience.
- Responsive interface: modern design, works on all devices.
- API: RESTful API for integration and testing (FastAPI).
-
Clone the repository
git clone https://github.com/SMatvii/Synk.git cd Synk
-
Install dependencies
python -m venv venv source venv/bin/activate # or venv\Scripts\activate for Windows
-
Run backend (FastAPI)
uvicorn backend:app --reload
Make sure your environment variables (
.env
) are set up -
Run frontend (Flask)
cd frontend flask run
-
Open in your browser
- Backend API: http://localhost:8000/docs (interactive Swagger documentation)
- Frontend: http://localhost:5000
- Register/Login
- Go to /auth, create an account or log in.
- Create a post
- After logging in, you can create a new post with a description and content.
- Follow users
- Open a user's profile and click "Follow".
- Comment
- Open any post and leave your comment.
- Search
- Use the search bar in the top menu to find posts/users.
- Switch theme
- Use the moon/sun icon to toggle interface themes.
Synk/
├── backend/ # FastAPI backend (API, models, routers)
│ ├── db/
│ ├── routes/
│ └── utils/
├── frontend/ # Flask frontend (templates, static files)
│ ├── templates/
│ └── static/
├── requirements.txt
├── README.md
└── ...
Unit tests for the main features (e.g., CRUD for comments, posts) can be found in their respective test files, such as: comment_test.py
. To run:
python -m unittest comment_test.py