A full-stack web application for building communities, creating groups, and sharing posts. Built with Django (DRF) backend and React + Tailwind CSS frontend. Site link: https://community-git-staging-dsbteks-projects.vercel.app/
- User registration and login (JWT token-based authentication)
- Create and manage groups
- Create posts within groups
- Public feed: anyone can view all posts
- Only authenticated users can create groups or posts
- Backend: Django, Django Rest Framework
- Database: MySQL (or SQLite for development)
- Frontend: React, Tailwind CSS
- Python 3.8+
- Node.js 16+
- npm or yarn
- MySQL (for production) or SQLite (for development)
-
Clone the repository:
git clone <your-repo-url> cd Community/backend
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Copy
.env.exampleto.envand set your database and secret key values. - By default, SQLite is used for development. For MySQL, update
DATABASESinsettings.py.
- Copy
-
Apply migrations:
python manage.py migrate
-
Create a superuser (admin):
python manage.py createsuperuser
-
Run the backend server:
python manage.py runserver
-
Navigate to the frontend directory:
cd ../frontend -
Install dependencies:
npm install # or yarn install -
Start the frontend development server:
npm start # or yarn start -
Access the app:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Backend:
.envfile for Django secret key, DB credentials, etc.
- Frontend:
- See
src/utils/getApiUrl.tsfor API base URL config.
- See
- Run backend tests:
python manage.py test - Run frontend tests:
npm test # or yarn test
MIT License. See LICENSE for details.