Repository navigation
Setup Guide
This guide will help you set up the DevMitra portfolio website locally on your machine.
Before you begin, make sure you have the following installed:
- Python 3.11+ (Download here)
- Git (Download here)
- Code Editor (VS Code, PyCharm, or any editor of your choice)
git clone https://github.com/logicbyroshan/portfolio-v2.0.git
cd portfolio-v2.0On Windows:
python -m venv venv
venv\Scripts\activateOn macOS/Linux:
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory:
# Basic Django Settings
SECRET_KEY=your-super-secret-key-here
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
# Database (Optional - SQLite is default)
# DATABASE_URL=mysql://username:password@localhost:3306/portfolio_db
# Email Configuration (Required for contact forms)
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
# Spotify API (Optional - for music section)
SPOTIPY_CLIENT_ID=your_spotify_client_id
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret
# Google Gemini API (Optional - for AI chatbot)
GEMINI_API_KEY=your_gemini_api_key
# Redis (Optional - for caching)
REDIS_URL=redis://localhost:6379/0Run migrations to set up the database:
python manage.py migrateTo access the Django admin panel:
python manage.py createsuperuserFor production deployment:
python manage.py collectstaticStart the development server:
python manage.py runserver🌐 Access the website at: http://127.0.0.1:8000/
- Enable 2-Factor Authentication on your Gmail account
- Generate an App Password:
- Go to Google Account Settings → Security → 2-Step Verification → App Passwords
- Select "Mail" and generate a password
- Use this password in
EMAIL_HOST_PASSWORD
- Go to Spotify Developer Dashboard
- Create a new app
- Copy Client ID and Client Secret to your
.envfile - Add
http://127.0.0.1:8000/callback/as a redirect URI
- Visit Google AI Studio
- Create an API key
- Add it to your
.envfile asGEMINI_API_KEY
No additional setup required. Database file will be created automatically.
- Install MySQL server
- Create a database:
CREATE DATABASE portfolio_db CHARACTER SET utf8mb4; CREATE USER 'portfolio_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON portfolio_db.* TO 'portfolio_user'@'localhost';
- Update
.envwith MySQL credentials - Install MySQL client:
pip install mysqlclient
- Fork this repository
- Connect to Render
- Set environment variables in Render dashboard
- Deploy!
# Build image
docker build -t portfolio .
# Run container
docker run -p 8000:8000 portfolio1. Module not found errors:
pip install -r requirements.txt2. Database errors:
python manage.py makemigrations
python manage.py migrate3. Static files not loading:
python manage.py collectstatic --clear4. Email not working:
- Check Gmail App Password
- Verify EMAIL_* settings in
.env - Ensure Gmail 2FA is enabled
If you encounter issues:
- Check the Issues page
- Create a new issue with error details
- Contact: [your-email@domain.com]
-
portfolio/- Main app (projects, skills, experience) -
blog/- Blog system with comments and categories -
music/- Spotify integration and playlists -
ai/- AI chatbot using Gemini API -
auth_app/- User authentication system -
notifications/- Email notifications -
roshan/- Personal resources and content
- Contact Form - Send test emails
- Blog System - Create posts and comments
- Music Integration - Test Spotify connectivity
- AI Chatbot - Verify Gemini API responses
- Authentication - Test signup/login flows
Your portfolio website should now be running locally. Start customizing the content, colors, and features to make it your own!
Need help? Open an issue on GitHub or check the main README.md for project overview.