A professional portfolio website built with FastAPI that showcases Python development expertise. This application dynamically displays your projects, skills, and professional information managed through Cosmic CMS.
- Dynamic Project Showcase - Display projects with screenshots, tech stacks, and live demo links
- Interactive Skills Matrix - Categorized skills with proficiency levels and experience indicators
- Professional About Section - Comprehensive bio with experience timeline and contact information
- Fast API Backend - High-performance API endpoints with automatic OpenAPI documentation
- Responsive Design - Mobile-first approach with modern CSS styling
- Real-time Content - Content updates instantly through Cosmic CMS
- SEO Optimized - Proper meta tags and structured data for search engines
- Performance Optimized - Fast loading with image optimization and caching
Want to create your own version of this project with all the content and structure? Clone this Cosmic bucket and code repository to get started instantly:
This application was built using the following prompts to generate the content structure and code:
"Create a content model for a Python developer portfolio with:
- Projects (title, description, tech stack, github link)
- Skills (name, proficiency level, category)
- About section (bio, experience)
This will showcase Python web development capabilities."
Based on the content model I created, now build a complete Python web application that showcases this content using pip.
Create a FastAPI application with:
- Modern, responsive design with proper navigation
- Content display from Cosmic CMS
- API endpoints for content retrieval
- Production-ready deployment configuration for Vercel
- Proper error handling and performance optimization
Use pip for all dependency management.
The app has been tailored to work with your existing Cosmic content structure and includes all the features requested above.
- Backend: FastAPI, Python 3.11+
- CMS: Cosmic Headless CMS
- Frontend: HTML5, CSS3, JavaScript ES6+
- Styling: Custom CSS with responsive design
- Deployment: Vercel (Serverless Functions)
- Package Management: pip with requirements.txt
- API Documentation: FastAPI auto-generated OpenAPI/Swagger docs
- Python 3.11 or higher
- pip (Python package installer)
- A Cosmic account with your content model set up
- Clone the repository
git clone <your-repo-url>
cd python-portfolio- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Environment Setup
Create a
.envfile in the root directory:
COSMIC_BUCKET_SLUG=your-bucket-slug
COSMIC_READ_KEY=your-read-key
COSMIC_WRITE_KEY=your-write-key- Run the application
uvicorn main:app --reloadThe application will be available at http://localhost:8000
from cosmicpy import CosmicPy
cosmic = CosmicPy()
bucket = cosmic.bucket(
bucket_slug='your-bucket-slug',
read_key='your-read-key'
)
# Get all projects
projects = bucket.get_objects(type='projects')
# Get a specific project by slug
project = bucket.get_object(slug='project-slug', type='projects')# Get all skills
skills = bucket.get_objects(type='skills')
# Filter skills by category (done in application logic)
programming_skills = [
skill for skill in skills['objects']
if skill['metadata']['category']['key'] == 'programming_languages'
]This application integrates with your Cosmic bucket using the following object types:
- title: Project name
- description: HTML description with features
- tech_stack: Technologies used
- github_url: Repository link
- demo_url: Live demo link
- category: Project category (Web App, API, Data Science, etc.)
- screenshot: Project preview image
- name: Skill name
- proficiency: Beginner, Intermediate, Advanced, Expert
- category: Programming Languages, Frameworks, Databases, Tools & DevOps, Cloud Platforms, Other
- years_experience: Years of experience with this skill
- bio: Professional biography (HTML)
- total_experience: Total years of experience
- current_role: Current job title
- location: Current location
- headshot: Professional photo
- resume: Resume/CV file
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on git push
- Build the application:
pip install -r requirements.txt - Set production environment variables
- Deploy using your preferred hosting service
The application includes a vercel.json configuration file for seamless Vercel deployment with proper routing for both the API and static assets.
GET /- Portfolio homepageGET /api/projects- Get all projectsGET /api/projects/{slug}- Get specific projectGET /api/skills- Get all skills grouped by categoryGET /api/about- Get about informationGET /docs- FastAPI auto-generated API documentation
Visit /docs when running locally to explore the interactive API documentation.
