🥘 Django-React-Jollof
Welcome to Django-React-Jollof! This package scaffolds a full-stack web application with Django for the backend and React for the frontend. It simplifies the setup process by automating configuration, migration, and installation of necessary dependencies.
📖 Table of Contents
- Features
- Tech Stack
- Getting Started
- Setting Up the Environment
- Authentication Setup
- Additional Features
- Development Workflow
- Final Project Structure
- Contribution
- License
- Connect with Us
- Conclusion
🌟 Features
- 🔧 Full-Stack Scaffolding: Django + React setup in seconds.
- ⚡ Modern Frontend: React with Vite for fast development.
- 🔐 Authentication: Optional Google login integration.
- 🎨 Customizable: Choose Bootstrap or Material UI for styling.
- 📡 API Ready: Django REST Framework for seamless backend/frontend communication.
🛠️ Tech Stack
| Component | Technology |
|---|---|
| Backend | Django, Django REST Framework |
| Frontend | React, Axios |
| Database | SQLite (default, configurable) |
| Styling | Bootstrap or Material UI |
| Tools | ESLint, Prettier, Vite (for fast React development) |
🚀 Getting Started
✅ Prerequisites
Make sure you have the following installed:
Backend:
- Python 3.10+
- pip
- virtualenv
Frontend:
- Node.js 20+ (recommended version)
- npm or Yarn
🔗 Installation
-
Create a Virtual Environment:
Navigate to your project directory and run the following commands to create and activate a virtual environment:
python -m venv env
Activate the virtual environment:
- On Linux/macOS:
source env/bin/activate
- On Windows:
.\env\Scripts\activate
- On Linux/macOS:
-
Install the Package:
With the virtual environment activated, install the package via pip:
pip install django-react-jollof
-
Run the Setup Command:
django-react-jollof cookDuring the setup, you will be prompted to provide a project name. Choose your desired name, and it will be automatically configured throughout the app, including:
- App name in the NavBar.
- The browser tab title for the frontend.
The command will also:
- Set up the Django backend and install necessary requirements.
- Set up the React frontend and install dependencies.
- Run database migrations.
- Configure social login (if selected).
Setting Up the Environment
In the frontend/ directory, create a .env file:
VITE_GOOGLE_CLIENT_ID=<your_google_client_id>
To start the backend server, navigate to the backend directory, activate your virtual environment, and run:
cd backend
source env/bin/activate # For Linux/macOS
# venv\Scripts\activate # For Windows
python manage.py runserver
The backend will be available at http://localhost:8000.
Next, start the frontend development server. Navigate to the frontend directory and run:
cd frontend
npm run dev
The React app will be available at http://localhost:5173.
🔑 Authentication Setup
To enable Google login, configure the following in your .env files:
Backend:
GOOGLE_CLIENT_ID=<your_google_client_id>
GOOGLE_CLIENT_SECRET=<your_google_client_secret>
Frontend:
VITE_GOOGLE_CLIENT_ID=<your_google_client_id>
Obtain the credentials from the Google Developer Console.
🎁 Additional Features
- Styling Frameworks: Choose between Bootstrap and Material UI for the frontend.
- API Integration: Powered by Django REST Framework.
- CORS: Pre-configured for frontend-backend communication.
🔄 Development Workflow
Edit backend code in the backend/ directory and use Django's tools for migrations, testing, and database management. Modify React components in frontend/src/ and use Vite for hot-reload development.
Final Project Structure
backend
│ ├── backend
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── db.sqlite3
│ ├── manage.py
│ ├── requirements.txt
│ └── users
│ ├── models.py
│ ├── permissions.py
│ ├── serializers.py
│ ├── tests
│ │ ├── __init__.py
│ │ ├── test_models.py
│ │ ├── test_permissions.py
│ │ ├── test_serializers.py
│ │ └── test_views.py
│ ├── urls.py
│ └── views.py
frontend
│ ├── env.d.ts
│ ├── index.html
│ ├── jsconfig.json
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ └── vite.svg
│ ├── src
│ │ ├── App.jsx
│ │ ├── actions
│ │ │ └── authActions.js
│ │ ├── assets
│ │ │ └── react.svg
│ │ ├── components
│ │ │ ├── Navbar.jsx
│ │ │ └── auth_buttons
│ │ │ ├── AuthButtons.jsx
│ │ │ └── GoogleLoginButton.jsx
│ │ ├── context
│ │ │ ├── AuthContext.jsx
│ │ │ └── ThemeContext.jsx
│ │ ├── main.jsx
│ │ ├── pages
│ │ │ ├── Login.jsx
│ │ │ ├── Profile.jsx
│ │ │ └── Register.jsx
│ │ ├── services
│ │ │ └── api.js
│ │ └── styles
│ │ └── main.css
│ └── vite.config.js
LICENSE
README.md
🤝 Contribution
-
Fork the repository.
-
Clone your fork:
git clone https://github.com/your-username/django-react-jollof.git
-
Create a branch:
git checkout -b feature/your-feature
-
Make your changes and commit:
git commit -m "Add your feature"
-
Push to your fork and submit a pull request.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
📣 Connect with Us
Feel free to open an issue on GitHub for bugs, feature requests, or questions.
If you find Django-React-Jollof helpful, please give the repository a ⭐ on GitHub. Your support helps us grow and improve!
🌐 Useful Links
- Documentation: django-react-jollof Docs
- Changelog: Releases
- Bug Tracker: Issues
Conclusion
With Django-React-Jollof, building a full-stack app has never been easier! 🍲 Let us know what you create!
Metadata
Release files for django-react-jollof 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_react_jollof-1.0.1.tar.gz | 36.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_react_jollof-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 83.3 kB
Release files / django_react_jollof-1.0.1.tar.gz
| Download URL | django_react_jollof-1.0.1.tar.gz |
|---|---|
| Size | 36.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ca57b1f0fcae44c1eb25cdc4c5271cc2aa34c3404ae827d0ea48434dfd0986d
|
|
BLAKE2b-256 checksum How to use checksums |
4275c34b9e81199807a6dba6acbeaef99312b4b4bc0276f02d269a8f33cf3c97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|
Release files / django_react_jollof-1.0.1-py3-none-any.whl
| Download URL | django_react_jollof-1.0.1-py3-none-any.whl |
|---|---|
| Size | 46.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af98a0ba6c255db28d19725fd7de98c89f2b5e1481b310e1eb8cad632aa295aa
|
|
BLAKE2b-256 checksum How to use checksums |
fb1a8cf2fe8b9929e9001e4a38363c97baf1e0ba63d9eced55d0c45adfed3422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|