A full-stack file management application built with React and Django, designed for efficient file handling and storage.
- Django 4.x (Python web framework)
- Django REST Framework (API development)
- SQLite (Development database)
- Gunicorn (WSGI HTTP Server)
- WhiteNoise (Static file serving)
- React 18 with TypeScript
- TanStack Query (React Query) for data fetching
- Axios for API communication
- Tailwind CSS for styling
- Heroicons for UI elements
- Docker and Docker Compose
- Local file storage with volume mounting
Before you begin, ensure you have installed:
- Docker (20.10.x or higher) and Docker Compose (2.x or higher)
- Node.js (18.x or higher) - for local development
- Python (3.9 or higher) - for local development
docker-compose up --build-
Create and activate virtual environment
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Create necessary directories
mkdir -p media staticfiles data
-
Run migrations
python manage.py migrate
-
Start the development server
python manage.py runserver
-
Install dependencies
cd frontend npm install -
Create environment file Create
.env.local:REACT_APP_API_URL=http://localhost:8000/api -
Start development server
npm start
- Frontend Application: http://localhost:3000
- Backend API: http://localhost:8000/api
- GET
/api/files/ - Returns a list of all uploaded files
- Response includes file metadata (name, size, type, upload date)
- POST
/api/files/ - Upload a new file
- Request: Multipart form data with 'file' field
- Returns: File metadata including ID and upload status
- GET
/api/files/<file_id>/ - Retrieve details of a specific file
- Returns: Complete file metadata
- DELETE
/api/files/<file_id>/ - Remove a file from the system
- Returns: 204 No Content on success
- Access file directly through the file URL provided in metadata
file-hub/
βββ backend/ # Django backend
β βββ files/ # Main application
β β βββ models.py # Data models
β β βββ views.py # API views
β β βββ urls.py # URL routing
β β βββ serializers.py # Data serialization
β βββ core/ # Project settings
β βββ requirements.txt # Python dependencies
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β βββ package.json # Node.js dependencies
βββ docker-compose.yml # Docker composition
- Hot reloading for both frontend and backend
- React Query DevTools for debugging data fetching
- TypeScript for better development experience
- Tailwind CSS for rapid UI development
-
Port Conflicts
# If ports 3000 or 8000 are in use, modify docker-compose.yml or use: # Frontend: npm start -- --port 3001 # Backend: python manage.py runserver 8001
-
File Upload Issues
- Maximum file size: 10MB
- Ensure proper permissions on media directory
- Check network tab for detailed error messages
-
Database Issues
# Reset database rm backend/data/db.sqlite3 python manage.py migrate
-
Before creating your submission zip file, ensure:
- All features are implemented and working as expected
- All tests are passing
- The application runs successfully locally
- Remove any unnecessary files or dependencies
- Clean up any debug/console logs
-
Create the submission zip file:
# Activate your backend virtual environment first cd backend source venv/bin/activate # On Windows: venv\Scripts\activate # Run the submission script from the project root cd .. python create_submission_zip.py
The script will:
- Create a zip file named
username_YYYYMMDD.zip(e.g.,johndoe_20240224.zip) - Respect .gitignore rules to exclude unnecessary files
- Preserve file timestamps
- Show you a list of included files and total size
- Warn you if the zip is unusually large
- Create a zip file named
-
Verify your submission zip file:
- Extract the zip file to a new directory
- Ensure all necessary files are included
- Verify that no unnecessary files (like node_modules, pycache, etc.) are included
- Test the application from the extracted files to ensure everything works
Video Guidance - Record a screen share demonstrating:
- How you leveraged Gen AI to help build the features
- Your prompting techniques and strategies
- Any challenges you faced and how you overcame them
- Your thought process in using AI effectively
IMPORTANT: Please do not provide a demo of the application functionality. Focus only on your Gen AI usage and approach.
-
Submit your project through this Google Form: Project Submission Form
-
The form will require:
- Your project zip file (named
username_YYYYMMDD.zip) - Your video documentation
- Any additional notes or comments about your implementation
- Your project zip file (named
Make sure to test the zip file and video before submitting to ensure they are complete and working as expected.