A modern portfolio application built with Vue 3, Nuxt 3, Vuetify 3, and Django to showcase cutting-edge web development practices. π
Before running the application, ensure you have the following installed:
- Node.js (v20.10.0 or later)
- NPM (v10.2.3 or later)
- Python (v3.11.10 or later)
- PIP (v24.3.1 or later)
- Docker & Docker Compose
Set up the project using either Docker Compose for a seamless, containerized or manually to allow more control for debugging and testing.
git clone https://github.com/your-username/personal-web-app.git
The application requires separate .env files for both the frontend and backend to ensure proper management of environment-specific configurations and sensitive data.
- Navigate to the
frontend
directory:
cd frontend
- Create a file named .env:
touch .env
- Add the required environment variables:
BASE_URL=http://localhost:3000
API_BASE_URL=http://localhost:8000/api/v1
GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
GOOGLE_RECAPTCHA_SITE_KEY=your_recaptcha_site_key_here
- Navigate back to root directory:
cd ..
- Navigate to the
backend/martinbullman
directory:
cd backend/martinbullman
- Create a file named .env:
touch .env
- Add the required environment variables:
APP_NAME=MartinBullmanApp
APP_ENV=local
APP_DEBUG=True
APP_URL=http://localhost:8000
API_URL=http://localhost:8000/api/v1
SECRET_KEY=your_django_secret_key_here
# Database Configuration (choose one)
# Localhost
#DB_CONNECTION=postgres
#DB_HOST=127.0.0.1
#DB_PORT=5432
#DB_DATABASE=your_database_name_here
#DB_USERNAME=your_database_user_here
#DB_PASSWORD=your_database_password_here
# Docker
DB_CONNECTION=postgres
DB_HOST=db
DB_PORT=5432
DB_DATABASE=your_docker_database_name_here
DB_USERNAME=postgres
DB_PASSWORD=postgres
# Email Configuration
EMAIL_HOST=your_email_host_here
EMAIL_PORT=2525
EMAIL_USERNAME=your_email_username_here
EMAIL_PASSWORD=your_email_password_here
[email protected]
EMAIL_FROM_NAME=Your Name or App Name
# MailJet API
MAILJET_API_KEY=your_mailjet_api_key_here
MAILJET_API_SECRET=your_mailjet_api_secret_here
# Spotify API
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token_here
# Google reCAPTCHA
GOOGLE_RECAPTCHA_SCORE=0.5 # Recommended score threshold
GOOGLE_RECAPTCHA_SECRET_KEY=your_recaptcha_secret_key_here
# API Keys
WEATHER_API_KEY=your_weather_api_key_here
NASA_API_KEY=your_nasa_api_key_here
SLACK_REFRESH_TOKEN=your_slack_refresh_token_here
OPENAI_API_KEY=your_openai_api_key_here
PAGE_SPEED_API_KEY=your_google_page_speed_api_key_here
- Navigate back to root directory:
cd ../../
You can use the Docker Compose command to build and run the application seamlessly. The backend .env file should be passed as a parameter to ensure the services are correctly configured. The docker-compose.yml file orchestrates both the frontend and backend services, setting them up together for a fully integrated development environment.
- Build Docker containers:
docker-compose --env-file ./backend/martinbullman/.env build
- Start Docker containers:
docker-compose --env-file ./backend/martinbullman/.env up
- Stop Docker containers:
docker-compose down
- Access the Application:
Frontend: http://localhost:3000
Backend: http://localhost:8000
Follow these instructions to manually set up and run the application without Docker. This approach allows you to configure and run the frontend and backend services independently for development and debugging purposes.
- Navigate to the
frontend
directory:
cd frontend
- Install dependencies:
npm install
- Run development server:
npm run dev
- Access App at:
http://localhost:3000
- Run Nuxt build:
npm run build
- Return to the project root directory:
cd ..
- Navigate to the
backend
directory:
cd backend
- Create virtual environment and activate:
python -m venv venv
source venv/bin/activate
- Install dependencies:
pip install -r martinbullman/requirements.txt
- Run database migrations for the Django backend:
python martinbullman/manage.py migrate
- Run development server:
python martinbullman/manage.py runserver
- Access API at:
http://localhost:8000/api/v1
- Return to the project root directory:
cd ..
Run unit tests for the frontend using Vitest:
- Navigate to the
frontend
directory:
cd frontend
- Run tests:
npm run test
Run unit tests for the backend using Django:
- Navigate to the
backend/martinbullman
directory:
cd backend/martinbullman
- Run tests:
python manage.py test
Run linting for the frontend using Eslint:
- Navigate to the
frontend
directory:
cd frontend
- Run lint:
npm run lint
Run linting for the backend using Pylint:
- Navigate to the
backend
directory:
cd backend
- Run lint:
pylint $(git ls-files '*.py')
Feel free to fork this repository, raise issues, or submit pull requests. Contributions are welcome and encouraged under the terms of the project's license.
Please ensure that your contributions follow the project's coding standards and guidelines. After forking, clone your copy of the repository, create a branch for your work, and submit a pull request for review.
Make sure to include tests, if applicable, and provide a clear description of the changes you've made.
This project is licensed under the Creative Commons Attribution 4.0 International License. See the LICENSE file for details.