A modern, containerized personal landing page featuring FastAPI backend, AI-powered chatbot, and stunning responsive frontend. Built for deployment on Hostinger VPS.
- Modern UI/UX: Sleek design with dark/light mode support
- AI Chatbot: Intelligent assistant powered by OpenAI or Anthropic
- Blog System: Markdown-based blog with frontmatter support
- Portfolio Showcase: Dynamic project cards with tech stack display
- Fully Containerized: Docker & Docker Compose ready
- Production Ready: Nginx reverse proxy, health checks, SSL support
- Responsive Design: Mobile-first approach with Bootstrap 5
- FastAPI: High-performance Python web framework
- OpenAI/Anthropic: AI chatbot integration
- Markdown: Blog post rendering
- Pydantic: Data validation
- HTML5/CSS3/JavaScript: Modern vanilla web technologies
- Bootstrap 5: Responsive UI framework
- Font Awesome: Icon library
- Google Fonts: Inter typography
- Docker: Containerization
- Nginx: Reverse proxy and static file serving
- Let's Encrypt: SSL certificates (optional)
.
βββ backend/
β βββ main.py # FastAPI application
β βββ schemas.py # Pydantic models
β βββ requirements.txt # Python dependencies
β βββ routers/
β β βββ blog.py # Blog endpoints
β β βββ apps.py # Portfolio endpoints
β β βββ chat.py # AI chat endpoint
β βββ services/
β βββ ai_service.py # AI integration
βββ frontend/
β βββ index.html # Main HTML
β βββ css/
β β βββ styles.css # Custom styles
β βββ js/
β βββ main.js # Frontend logic
βββ data/
β βββ context.md # AI chatbot context
β βββ apps.json # Portfolio data
β βββ blog/ # Blog posts (Markdown)
βββ Dockerfile # Backend container
βββ docker-compose.yml # Service orchestration
βββ nginx.conf # Nginx configuration
βββ deploy.sh # Deployment script
βββ .env.example # Environment template
- Docker & Docker Compose
- OpenAI or Anthropic API key
-
Clone the repository
git clone <your-repo-url> cd twilight-aldrin
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys -
Configure your AI provider
Edit
.env:AI_PROVIDER=openai # or 'anthropic' OPENAI_API_KEY=your_key_here
-
Customize your content
- Edit
data/context.mdwith your bio - Update
data/apps.jsonwith your projects - Add blog posts to
data/blog/(Markdown format)
- Edit
-
Run with Docker Compose
docker-compose up --build
-
Access the application
- Frontend: http://localhost
- Backend API: http://localhost/api
- API Docs: http://localhost:8000/docs
Backend:
cd backend
pip install -r requirements.txt
uvicorn main:app --reloadFrontend:
Serve the frontend/ directory with any static file server.
Create a new Markdown file in data/blog/:
---
title: "Your Post Title"
date: "2026-01-15"
author: "Your Name"
excerpt: "Brief description"
tags: "Python, FastAPI, Docker"
---
# Your Post Title
Your content here...Edit data/apps.json:
{
"id": "project-id",
"name": "Project Name",
"description": "Project description",
"tech_stack": ["React", "Node.js"],
"demo_url": "https://demo.com",
"github_url": "https://github.com/...",
"featured": true
}Edit data/context.md with your:
- Professional background
- Skills and expertise
- Projects and achievements
- Personal interests
-
Upload files to VPS
scp -r . user@your-vps-ip:/path/to/app -
SSH into VPS
ssh user@your-vps-ip cd /path/to/app -
Run deployment script
chmod +x deploy.sh ./deploy.sh
The script will:
- β Check and install Docker/Docker Compose
- β Validate environment configuration
- β Build and start containers
- β Provide SSL setup instructions
After deployment, enable HTTPS:
# Install Certbot
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx
# Stop Nginx container
docker-compose stop nginx
# Obtain certificate
sudo certbot certonly --standalone -d yourdomain.com
# Copy certificates
mkdir -p ssl
sudo cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem ssl/
sudo cp /etc/letsencrypt/live/yourdomain.com/privkey.pem ssl/
sudo chown -R $USER:$USER ssl/
# Update nginx.conf for SSL (add server block for port 443)
# Restart
docker-compose up -dAdd to nginx.conf:
server {
listen 443 ssl http2;
server_name yourdomain.com;
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# ... rest of your configuration
}| Variable | Description | Required |
|---|---|---|
AI_PROVIDER |
AI provider (openai or anthropic) |
Yes |
OPENAI_API_KEY |
OpenAI API key | If using OpenAI |
ANTHROPIC_API_KEY |
Anthropic API key | If using Anthropic |
OPENAI_MODEL |
OpenAI model name | No |
ANTHROPIC_MODEL |
Anthropic model name | No |
ALLOWED_ORIGINS |
CORS allowed origins | No |
DOMAIN |
Your domain name | For SSL |
Once running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
GET /api/blog- List all blog postsGET /api/blog/{slug}- Get specific blog postGET /api/apps- List portfolio applicationsPOST /api/chat- Send message to AI chatbotGET /health- Health check
Edit CSS variables in frontend/css/styles.css:
:root {
--accent-primary: #3b82f6;
--accent-secondary: #8b5cf6;
/* ... more variables */
}Change Google Fonts in frontend/index.html:
<link href="https://fonts.googleapis.com/css2?family=YourFont:wght@400;700&display=swap" rel="stylesheet"># View logs
docker-compose logs -f
# Restart services
docker-compose restart
# Rebuild from scratch
docker-compose down
docker-compose up --build- Check backend is running:
docker-compose ps - Verify environment variables:
cat .env - Check API health:
curl http://localhost:8000/health
- Check Nginx logs:
docker-compose logs nginx - Verify frontend files are mounted correctly
- Clear browser cache
# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f [service-name]
# Restart specific service
docker-compose restart [service-name]
# Update and redeploy
git pull
docker-compose up -d --build
# Execute command in container
docker-compose exec backend bashFeel free to fork and customize for your own use!
MIT License - feel free to use this project for your personal portfolio.
- Built with β€οΈ using FastAPI and Bootstrap
- AI powered by OpenAI/Anthropic
- Icons by Font Awesome
- Fonts by Google Fonts