DoneWithIt is a professional C2C (Consumer-to-Consumer) marketplace platform designed to streamline the resale of pre-owned items. It features a decoupled architecture with a robust Django REST Framework backend, optimized for high-performance integration with a React-based frontend.
- Python 3.12+: Core language for the backend.
- Django & DRF: High-level framework for rapid development and RESTful API creation.
- SQLite: Lightweight database for development.
- Pillow: Image processing library for product photos.
- CORS Headers: Security configuration for Cross-Origin Resource Sharing with React.
- Modular Architecture: Separated logic into
usersandproductsapps for scalability. - Smart Product Management: Supports categories, slugs, and specific item conditions (New, Second Hand, etc.).
- Automated Seller Relationships: Integrated logic that automatically links products to the authenticated seller via
perform_create. - Secure API Design: Custom permission classes ensure that only owners can modify their listings.
- Profile Customization: Extended User model with bio, location, and avatar management.
The project follows a Decoupled API-First approach. The workflow is as follows:
- Request: The frontend (React) sends an HTTP request to specialized endpoints.
- Logic: Django ViewSets process the request using
ModelViewSetsfor CRUD operations. - Serialization: Data is transformed into optimized JSON through dedicated Serializers.
- Security: Permission layers check authentication before allowing data modification.
- Clone the repository:
git clone https://github.com/your-username/donewithit-backend.git
cd donewithit-backend
- Create a virtual environment and install dependencies:
python -m venv venv
# On Windows:
venv\Scripts\activate
pip install django djangorestframework django-cors-headers pillow
- Run Migrations:
python manage.py makemigrations
python manage.py migrate
- Launch the application:
python manage.py runserver
This project is an ongoing technical challenge involving:
- Database Normalization: Designing relationships between
User,Profile, andProductmodels. - API Security: Implementing granular permissions to protect user data.
- DRF Optimization: Using
Nested Serializationto deliver rich data in a single API call, reducing frontend requests.