FitShare is a social networking platform designed for sports enthusiasts to connect, share their achievements, provide advice, and engage in discussions related to sports. This repository contains the source code and files necessary to set up and run the FitShare platform.
- User registration and authentication system.
- News feed displaying recent posts from followed users.
- User profiles with the ability to send messages and follow/unfollow users.
- Search functionality to find users and posts.
- User-specific posts and the ability to report inappropriate content.
- Private messaging system.
- Admin functionality for managing reported posts.
- Create both classic and ephemeral (story) posts.
-
Import Database Schema: Use the provided
sql.sql
file to import the database schema. -
Edit
db.php
File: Open thedb.php
file and input your database connection details:<?php // db.php $db_host = "your_database_host"; $db_user = "your_database_username"; $db_pass = "your_database_password"; $db_name = "your_database_name"; ?>
-
You can see here the database organization :
To automatically delete ephemeral posts, set up a cron job:
-
Open Terminal: Launch your terminal or command prompt.
-
Edit Cron Jobs: Edit your user's cron jobs by typing:
crontab -e
-
Add Cron Job Line: Add the following line to the cron file to run the script every minute:
* * * * * /usr/bin/php /path/to/fitshare/script.php
Replace /path/to/fitshare with the actual path to your script.php file. Note: Ensure that the path to the PHP binary (/usr/bin/php) is accurate on your system.
Follow these steps to get started with FitShare:
-
Register and Log In: Start by registering a new user through the registration page. Once registered, log in to your account.
-
Home Page: After logging in, you'll be directed to the home page. Here, you'll find a feed displaying the 20 most recent posts from users you follow.
-
Exploring Profiles: Explore user profiles by clicking on usernames. You can view their posts, send messages, and follow/unfollow them.
-
Interacting with Posts: On the home page, you can like, unlike, and report posts. Engage with posts from fellow sports enthusiasts.
-
Private Messaging: Utilize the private messaging system by navigating to the "Message" page. View conversations with other users and send messages privately.
-
Admin Functions: If you have admin privileges, access the reporting system to manage posts that have been reported by other users.



