- University: University of Engineering and Technology, VNU
- Name: Lê Đức Minh
- Student ID: 23020683
This README only provides project overview, tech stack, directory structure and installation & setup on local computer.
For Database design, access: Database Design
For details on web's features, access: Features
DevShare Lite is a web application designed as a social platform for developers. It allows users to share IT knowledge with each other, through posting articles in markdown or through discussions with a comment system. Inspired by others similar social web like Reddits, Stack Overflow, … DevShare Lite also features ‘infinite scroll’, providing users with a better experience. Search engines are also incorporated, helping users in finding posts with the desired theme.
- Framework: Next.js 13+ (App Router) - using Server Components for performance and Client Components for interactive features.
- Language: TypeScript - For type safety and better developer experience.
- Styling: Tailwind CSS - a fast and flexible CSS framework for building user interfaces.
- State Management: React Context API for global authentication state management.
- Data Fetching:
axioswith interceptors to handle API requests and attach tokens automatically. - UI/UX:
react-markdownfor rendering Markdown content,lucide-reactfor icons.
- Framework: Django, Django Rest Framework (DRF)
- Authentication:
dj-rest-authwithdjango-allauthto handle user signup, login, password management anddjangorestframework-simplejwtfor secure token-based (JWT) authentication. - Database: PostgreSQL - A powerful, open-source object-relational database system.
- API Features: Nested routers (
drf-nested-routers) to organize comments in each post and built-in filtering (django-filter) for search functionality. - CORS:
django-cors-headersto manage cross-origin requests from the frontend.
frontend/
└── src/
├── app/ # Main application routes (App Router)
│ ├── login/
│ ├── posts/
│ │ ├──[id]/
│ │ ├── create/
│ │ └── edit/[id]/
│ ├── profile/
│ ├── search/
│ ├── signup/
│ ├── page.tsx # Homepage
│ └── layout.tsx # Overall Layout
├── components/ # Reusable React components (Post, CommentBox, etc.)
├── context/ # React Context for global state (AuthContext)
├── types/ # Global TypeScript type definitions (interfaces)
└── utils/ # Utility functions, especially for API calls
backend/
├── backend/ # Django project configuration (settings.py, urls.py)
├── comments/ # Django app for Comments
├── posts/ # Django app for Posts and Tags
├── users/ # Django app for custom User model and Profile
├── utils/ # Utilities function
├── manage.py # Django's command-line utility
└── requirement.txt # Python dependencies for the backend
- Node.js: v22.17.0
- Python: 3.13.5
- PostgreSQL: 9.4
- Navigate to the frontend directory:
cd source_code/frontend - Install dependencies:
npm install - Start the frontend development server:
npm run dev( local server often ishttp://localhost:3000)
- Create a new database.
- Right-click at the created database → choose Restore.
- Choose
Devshare.sqlinsource_code/backend.
- Navigate to the backend directory:
cd source_code/backend - Create and activate a virtual environment:
python -m venv venv # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirement.txt - Configure your PostgreSQL database and update the
DATABASESsetting inbackend/settings.py. - Run database migrations:
python manage.py migrate - Start the backend server:
python manage.py runserver