This is a project to create a single personal portfolio page with a clear and simple structure.
🌐 Live Website: https://roberfi.com
- 🌍 Multi-language support (EN/ES) using django-modeltranslation
- 🎨 Modern UI with Tailwind CSS and DaisyUI
- 🔐 Cookie consent management with django-cooco
- 📝 Admin-editable content - No code changes needed to update your portfolio
- 📧 Contact form with email notifications and database storage
- 📱 Fully responsive design
- 🐳 Docker-ready for easy deployment
- Django 5.1 - Web framework
- Python 3.13 - Programming language
- SQLite/PostgreSQL - Database
- Tailwind CSS 4 - Utility-first CSS framework
- DaisyUI - Component library
- Webpack 5 - Module bundler
- Django Cotton - Component-based templating
- uv - Fast Python package manager
- ruff - Python linter and formatter
- mypy - Static type checker
- eslint - JavaScript linter
- prettier - Code formatter
- djlint - Django template linter
- pre-commit - Git hooks for code quality
- Python 3.13
- Node.js (for frontend development)
- uv (Python package manager)
- Docker and Docker Compose (for deployment)
-
Clone the repository:
git clone https://github.com/roberfi/personal-portfolio.git
-
Install python development environment with uv:
uv sync --dev
-
Activate the virtual environment:
source .venv/bin/activate -
Install pre-commit tool
pre-commit install
-
Go into django project directory
cd src -
Create a mediafiles folder and add
background.jpg,background_preview.jpgandfavicon.icoinside. -
Create an environment file (
.env) with the following enviornment variables:DEBUG=true SECRET_KEY=<your dev secret key> DATABASE_URL=sqlite:///<path to db.sqlite3 file> # Email Configuration (optional for development - emails print to console) CONTACT_EMAIL=contact@localhost
-
Run migrations
python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Run django
python manage.py runserver
-
To enter in frontend environment mode, open a new terminal and install node environment
npm install
-
Run webpack in watch mode
npm run dev
-
Navigate to localhost:8000 and enjoy
-
Clone the repository:
git clone https://github.com/roberfi/personal-portfolio.git
-
Go into deploy directory:
cd src/deploy -
Create an environment file (
.env) with the following enviornment variables:SERVER_NAMES=<name of the hosts separated by spaces> SECRET_KEY=<strong secret key> POSTGRES_DB=<name of the postgres database> POSTGRES_USER=<name of the postgres user> POSTGRES_PASSWORD=<name of the postgres password for the given user> # Email Configuration (required for contact form) EMAIL_HOST=smtp.your-provider.com EMAIL_PORT=587 EMAIL_USE_TLS=True EMAIL_USE_SSL=False EMAIL_HOST_USER=your-username EMAIL_HOST_PASSWORD=your-password DEFAULT_FROM_EMAIL=noreply@your-domain.com CONTACT_EMAIL=contact@your-domain.com
-
Create a folder called
ssland store there yourcert.pemandkey.pemfiles Note: to test it locally, dummy untrusted certificates can be generated with the following command:openssl req -x509 -nodes -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365
-
Create a mediafiles folder and add
background.jpg,background_preview.jpgandfavicon.icoinside. -
Build the docker image with docker compose:
docker compose build
-
Run the docker compose containers:
docker compose up -d
-
To stop them, execute:
docker compose down
Run the test suite:
cd src
python manage.py test# Run ruff linter
ruff check .
# Run ruff formatter
ruff format .
# Run type checker
mypy .
# Run Django template linter
djlint src --check# Run eslint
npm run eslint
# Run prettier
npm run prettier
# Auto-fix issues
npm run eslint-fix
npm run prettier-fixAll code quality checks run automatically on commit via pre-commit hooks.
This project is licensed under the MIT License - see the LICENSE file for details.