A flask application with mySQL database
Choose your preferred setup method:
- Local Development - For development and testing
- Docker Deployment - For simplified deployment
- Python 3.8+
- pip (Python package installer)
- PostgreSQL
- Git
- Docker & Docker Compose
- Git
git https://github.com/Rohan123code/EDUINTEL
cd EDUINTEL/serverLinux/macOS:
python3 -m venv .aipdf
source env/bin/activateWindows:
python -m venv .aipdf
.\aipdf\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root:
# Database Configuration
PPERPLEXITY_API_KEY = ****
GOOGLE_API_KEY = ****
CLOUD_NAME=****
CLOUD_API_KEY=****
CLOUD_API_SECRET=****
MYSQL_HOST=localhost
MYSQL_USER=admin
MYSQL_PASSWORD=admin123
MYSQL_DB=ragdbLinux/macOS:
# Start PostgreSQL and create database
sudo mysql -u root -pWindows:
# Open pgAdmin or use psql from PostgreSQL installation
mysql -u root -pIn PostgreSQL shell:
CREATE DATABASE ragdb;
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin123';
GRANT ALL PRIVILEGES ON ragdb.* TO 'admin'@'localhost';
FLUSH PRIVILEGES;
\q# Create Django app (if needed)
python manage.py startapp oroshine_webapp
# Run migrations
python manage.py makemigrations
python manage.py migrate
# Create admin user
python manage.py createsuperuserpython manage.py runserverπ Access your application:
- Main App: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
Update your .env file for Docker (change database host):
# Database Configuration (Docker)
PG_DB=oroshine
PG_USER=postgres
PG_PASSWORD=postgres
PG_HOST=db
PG_PORT=5432
# Django Configuration
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
# Email Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
# Calendar Integration
NOCODEAPI_CALENDAR_URL=https://v1.nocodeapi.com/your-username/calendar/your-api-keyLinux/macOS:
# Build and start services
sudo docker-compose up --build
# Run in background
sudo docker-compose up --build -dWindows:
# Build and start services
docker-compose up --build
# Run in background
docker-compose up --build -dStop services:
docker-compose downComplete cleanup:
# Stop and remove everything
docker-compose down -v
docker system prune -afView logs:
docker-compose logs web
docker-compose logs dbExecute commands in container:
docker-compose exec web python manage.py createsuperuseroroshine/
βββ oroshine_app/ # Main Django project
β βββ settings.py # Django settings
β βββ urls.py # URL routing
β βββ wsgi.py # WSGI configuration
βββ oroshine_webapp/ # Django application
β βββ models.py # Database models
β βββ views.py # View functions
β βββ urls.py # App URLs
β βββ templates/ # HTML templates
βββ requirements.txt # Python dependencies
βββ docker-compose.yml # Docker services
βββ Dockerfile # Docker image config
βββ .env # Environment variables
βββ README.md # Documentation
- Visit NoCodeAPI.com
- Sign up or log in
- Verify your email
- Create API: Dashboard β "Create New API" β "Google Calendar"
- Connect Google: Sign in and grant calendar permissions
- Configure: Set API name and permissions (Read/Write)
- Get Endpoint: Copy your unique API URL
Add the API URL to your .env file:
NOCODEAPI_CALENDAR_URL=https://v1.nocodeapi.com/your-username/calendar/your-api-keycurl -X GET "https://v1.nocodeapi.com/your-username/calendar/your-api-key/events"- Enable 2FA: Go to Google Account β Security β 2-Step Verification
- Generate App Password: Security β App passwords β Generate
- Update .env: Use the generated app password (not your Gmail password)
# Reset migrations
python manage.py migrate --fake-initial
# Check database connection
python manage.py dbshell# Check running containers
docker ps
# Check logs for errors
docker-compose logs
# Restart services
docker-compose restart| Issue | Solution |
|---|---|
| Port 8000 in use | Kill process: lsof -ti:8000 | xargs kill -9 (Linux/macOS) |
| Permission denied | Use sudo for Docker commands (Linux) |
| Database connection failed | Check PostgreSQL service status |
| Migration errors | Delete migration files and recreate |
- PostgreSQL Integration - Robust database with Django ORM
- Email System - SMTP configuration for notifications
- Calendar Sync - Google Calendar integration via NoCode API
- Admin Interface - Django admin panel for management
- Cross-Platform - Works on Linux, macOS, and Windows
- Docker Ready - Containerized deployment option
- Never commit
.envfiles to version control - Use strong secret keys in production
- Set
DEBUG=Falsefor production - Regularly backup your database
- Monitor API usage limits for NoCode Calendar