A comprehensive profile management API playground built with FastAPI, showcasing skills, projects, and professional experience. This application serves as a backend assessment demonstrating full-stack development capabilities.
# 1. Install dependencies
pip install -r requirements.txt
# 2. Create database and seed data
python seed_database.py
# 3. Start the application (RECOMMENDED METHOD)
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reload
# 4. Open in browser
# Frontend: http://localhost:8000
# API Docs: http://localhost:8000/docsNote: If you get Pydantic errors with python main_profile.py, use the uvicorn command above instead!
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reloadpython start_app.pypython main_profile.py- ✅ Server starts without errors
- ✅ Database is created and seeded with sample data
- ✅ Frontend loads at http://localhost:8000
- ✅ API documentation at http://localhost:8000/docs
- ✅ All endpoints work (health, profiles, search, etc.)
Press Ctrl+C in the terminal where the server is running.
- Framework: FastAPI (Python 3.8+)
- Database: SQLite (easily configurable for PostgreSQL/MySQL)
- ORM: SQLAlchemy 2.0
- Validation: Pydantic v2
- API Documentation: Auto-generated with Swagger UI
- Technology: Vanilla HTML/CSS/JavaScript
- Features: Responsive design, real-time search, interactive UI
- Integration: Direct API consumption with CORS support
-- Core Profile Management
profiles (id, name, email, education, bio, location, created_at, updated_at)
skills (id, profile_id, name, level, category, created_at)
projects (id, profile_id, title, description, technologies, github_url, live_url, start_date, end_date, is_active)
work_experiences (id, profile_id, company, position, description, start_date, end_date, is_current, location)
profile_links (id, profile_id, platform, url, created_at)
-- Legacy Wallet Management (for backward compatibility)
users (id, name, email, phone, created_at)
wallets (id, user_id, balance, updated_at)
transactions (id, user_id, amount, transaction_type, description, created_at)- Python 3.8 or higher
- pip (Python package manager)
-
Clone the repository
git clone <repository-url> cd Fullstack
-
Create virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Initialize database
python seed_database.py
-
Run the application
Method 1: Using Uvicorn (Recommended)
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reload
Method 2: Using the startup script
python start_app.py
Method 3: Direct Python (if Method 1 doesn't work)
python main_profile.py
-
Access the application
- Frontend: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Alternative API Docs: http://localhost:8000/redoc
- Health Check: http://localhost:8000/health
-
Environment Variables
export DATABASE_URL="postgresql://user:password@localhost/meapi_playground" export DEBUG=False
-
Database Migration (for PostgreSQL)
# The application will automatically create tables on startup # For production, consider using Alembic for migrations
-
Deploy with Gunicorn
pip install gunicorn gunicorn main_profile:app -w 4 -k uvicorn.workers.UvicornWorker
POST /profiles- Create a new profileGET /profiles- List all profiles (with pagination)GET /profiles/{profile_id}- Get complete profile detailsPUT /profiles/{profile_id}- Update profileDELETE /profiles/{profile_id}- Delete profile
POST /profiles/{profile_id}/skills- Add skill to profileGET /profiles/{profile_id}/skills- Get profile skillsGET /skills/top- Get most common skillsGET /skills/search- Search skills by name/level
POST /profiles/{profile_id}/projects- Add project to profileGET /profiles/{profile_id}/projects- Get profile projectsGET /projects?skill={skill}- Get projects by skill/technology
POST /profiles/{profile_id}/work- Add work experienceGET /profiles/{profile_id}/work- Get work experience
POST /profiles/{profile_id}/links- Add profile linkGET /profiles/{profile_id}/links- Get profile links
GET /search?q={query}- Global search across all contentGET /health- Health check endpoint
curl -X POST "http://localhost:8000/profiles" \
-H "Content-Type: application/json" \
-d '{
"name": "John Developer",
"email": "john@example.com",
"education": "Computer Science Degree",
"bio": "Passionate full-stack developer",
"location": "San Francisco, CA"
}'curl -X POST "http://localhost:8000/profiles/1/skills" \
-H "Content-Type: application/json" \
-d '{
"name": "Python",
"level": "expert",
"category": "programming"
}'curl "http://localhost:8000/projects?skill=Python"curl "http://localhost:8000/search?q=machine%20learning"curl "http://localhost:8000/skills/top?limit=10"- Profile CRUD operations (name, email, education, bio, location)
- Skills management with levels and categories
- Projects with technologies, links, and descriptions
- Work experience tracking
- Profile links (GitHub, LinkedIn, portfolio)
- Query endpoints:
-
GET /projects?skill=python- Projects by skill -
GET /skills/top- Most common skills -
GET /search?q=...- Global search
-
-
GET /health- Health check endpoint
- SQLite database (easily configurable for PostgreSQL/MySQL)
- Complete schema with relationships
- Seeded with realistic sample data
- Proper indexing for performance
- Minimal but functional HTML/CSS/JavaScript UI
- Search by skill functionality
- Project listing and display
- Profile viewing capabilities
- CORS configured for API calls
- Responsive design
- Comprehensive API documentation
- Input validation and error handling
- Pagination support
- Real-time search
- Statistics dashboard
- Health monitoring
- Backend: FastAPI, SQLAlchemy, Pydantic
- Database: SQLite (production-ready for PostgreSQL)
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Development: Python 3.8+, pip, virtual environments
- Documentation: Swagger UI, ReDoc
- Primary key:
id - Unique constraints:
email - Indexes:
email,created_at
- Foreign key:
profile_id→profiles.id - Indexes:
name,level,category
- Foreign key:
profile_id→profiles.id - JSON field:
technologies(array of strings) - Indexes:
title,is_active,start_date
- Foreign key:
profile_id→profiles.id - Indexes:
company,start_date,is_current
- Foreign key:
profile_id→profiles.id - Indexes:
platform,url
- Add
Procfile:web: gunicorn main_profile:app -w 4 -k uvicorn.workers.UvicornWorker - Add PostgreSQL addon
- Set environment variables
- Deploy with Git
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "main_profile.py"]- Use managed database services (RDS, Cloud SQL, etc.)
- Deploy with container services or serverless functions
- Configure load balancers and CDN for frontend
DATABASE_URL=sqlite:///./meapi_playground.db # Database connection string
DEBUG=True # Debug mode
CORS_ORIGINS=* # CORS allowed originsThe application supports multiple database backends:
- SQLite (default, for development)
- PostgreSQL (recommended for production)
- MySQL (supported via SQLAlchemy)
- Database queries are optimized with proper indexing
- Pagination implemented for large datasets
- Caching can be added with Redis for production
- API responses are compressed
- Frontend assets are minified
- Use the interactive API documentation at
/docs - Test the frontend interface at the root URL
- Verify all CRUD operations work correctly
# Install testing dependencies
pip install pytest pytest-asyncio httpx
# Run tests
pytest tests/Error: ImportError: email-validator is not installed
Solution:
pip install pydantic[email]Error: Long Pydantic model rebuild errors Solution: Use uvicorn directly instead:
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reloadError: no such table: profile_links
Solution: Create tables first:
python -c "from database import engine; import models; models.Base.metadata.create_all(bind=engine)"
python seed_database.pyError: Address already in use
Solution: Kill existing processes and try again:
# Windows
taskkill /f /im python.exe
taskkill /f /im uvicorn.exe
# Then restart
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reloadError: StaticFiles directory not found
Solution: The app will work without static files, but create the directory:
mkdir static# 1. Install dependencies
pip install -r requirements.txt
# 2. Create database and seed data
python seed_database.py
# 3. Start the application
uvicorn main_profile:app --host 0.0.0.0 --port 8000 --reload
# 4. Open in browser
# Frontend: http://localhost:8000
# API Docs: http://localhost:8000/docs- Authentication: No user authentication system (can be added)
- File Uploads: No support for profile images or project screenshots
- Real-time Updates: No WebSocket support for real-time updates
- Rate Limiting: No API rate limiting (can be added with Redis)
- Caching: No caching layer (can be added with Redis)
- Logging: Basic logging (can be enhanced with structured logging)
- User authentication and authorization
- File upload for profile images and project screenshots
- Real-time notifications with WebSockets
- Advanced search with filters and sorting
- API rate limiting and caching
- Comprehensive test suite
- CI/CD pipeline
- Monitoring and analytics dashboard
Developer: Gagan Email: [Your Email] GitHub: [Your GitHub Profile] LinkedIn: [Your LinkedIn Profile] Portfolio: [Your Portfolio Website]
Resume: [Link to your resume/CV]
This project is created for assessment purposes. All rights reserved.
- Clone and setup the repository
- Install dependencies with
pip install -r requirements.txt - Seed the database with
python seed_database.py - Run the application with
python main_profile.py - Visit http://localhost:8000 to explore the playground!
The application includes comprehensive sample data showcasing various profiles, skills, projects, and work experiences. Use the search functionality to explore the data and test the API endpoints through the interactive documentation.