BrainFuel is an AI-powered educational platform built with Django that connects students with teachers. The platform facilitates personalized learning experiences through course materials, study resources, and interactive features.
- User Authentication: Secure login, registration, and profile management
- Role-Based Access: Separate interfaces for students and teachers
- Course Management: Teachers can create and manage courses
- Study Materials: Students can access and create study materials
- Payment Integration: Subscription plans for premium content
- Responsive Design: Modern UI that works across devices
- auth_app: Handles user authentication and profile management
- core: Core functionality including landing page and common features
- payment: Subscription plans and payment processing
- student: Student-specific features and dashboard
- teacher: Teacher-specific features and course management
- templates: HTML templates for all app components
- static: CSS, JavaScript, and image assets
- Django (Python web framework)
- SQLite (Database)
- HTML/CSS/JavaScript (Frontend)
- Bootstrap (UI Framework)
-
Clone the repository
git clone https://github.com/webKing021/BrainFuel-AI-Django.git
-
To create a virtual environment :
python -m venv .venv
-
To activate virtual environment :
.venv\Scripts\activate
-
To install Django :
py -m pip install Django
-
To create a Django project :
django-admin startproject <PROJECT_NAME> cd .\Krutarth\
-
To run the created project :
python manage.py runserver <PORT_NUMBER>
-
To create an application :
django-admin startapp <APP_NAME>
-
To connect to MySQL database
pip install mysqlclient
-
To create migration
py manage.py makemigrations
-
To migrate tables
py manage.py migrate
-
To create superuser
py manage.py createsuperuser
Use Mailtrap to send development emails (verification, password reset) without sending real emails.
-
Create a free Mailtrap account and get your SMTP credentials (Username and Password) from Inbox > SMTP Settings.
-
Add credentials as environment variables (recommended):
- Windows (PowerShell):
setx MAILTRAP_USER "<your_username>" setx MAILTRAP_PASS "<your_password>"
- Windows (PowerShell):
-
Update
BrainFuel/BrainFuel/settings.pyto use the variables:# Email (Mailtrap) EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'sandbox.smtp.mailtrap.io' EMAIL_PORT = '2525' EMAIL_USE_TLS = True EMAIL_HOST_USER = <your key> EMAIL_HOST_PASSWORD = <your key> DEFAULT_FROM_EMAIL = '[email protected]'
-
Test email sending in Django shell:
py manage.py shell >>> from django.core.mail import send_mail >>> send_mail('Test Email', 'Hello from BrainFuel!', None, ['[email protected]']) 1
Open your Mailtrap Inbox to see the message.
Add these to BrainFuel/BrainFuel/settings.py to serve static assets and user uploads during development:
# Static files (CSS, JavaScript, Images)
STATIC_URL = 'static/'
STATICFILES_DIRS = [
BASE_DIR / 'static',
]
STATIC_ROOT = BASE_DIR / 'staticfiles' # used by collectstatic in production
# Media files (User uploads)
MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'media'Notes:
- Development: Ensure your root
urls.pyserves media whenDEBUG=True:from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # ... your URLs here ... ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
- Production: Configure your web server (e.g., Nginx) to serve
/static/fromSTATIC_ROOTand/media/fromMEDIA_ROOT.
The project includes a SQL dump file in the Database folder that can be used to restore the database state.
MIT