This document outlines the API contracts for Likith Ganmarapu's portfolio website, detailing the transition from mock data to full backend implementation.
- Location:
/app/frontend/src/data/mock.js - Structure: Personal details, contact information, bio, availability status
- Mock Functions: Basic profile data retrieval
- Mock Data: 3 educational records (Mahindra University, Sri Chaitanya Junior Kalasala, Sri Chaitanya Techno School)
- Fields: Institution, degree, location, duration, CGPA/percentage, status
- Mock Data: 1 patent record
- Fields: Title, patent number, publish date, description
- Mock Data: 3 professional experiences
- Fields: Position, company, location, duration, type, achievements array
- Mock Data: 3 technical projects
- Fields: Title, duration, technologies array, description, achievements array, category
- Mock Data: Categorized skills and certifications
- Categories: Languages, developer tools, libraries, cloud infrastructure, hardware
- Mock Data: 4 award records
- Fields: Title, description, year
- Mock Function:
submitContactForm()- simulated form submission - Mock Function:
downloadResume()- simulated file download
GET /api/profile
- Returns personal information, bio, contact details, availability
- Response: PersonalInfo object
PUT /api/profile
- Updates personal information (admin only)
- Body: PersonalInfo object
GET /api/education
- Returns all education records
- Response: EducationRecord[]
POST /api/education (admin only)
- Creates new education record
- Body: EducationRecord object
PUT /api/education/:id (admin only)
- Updates existing education record
- Body: EducationRecord object
DELETE /api/education/:id (admin only)
- Deletes education record
GET /api/experience
- Returns all experience records
- Response: ExperienceRecord[]
POST /api/experience (admin only)
- Creates new experience record
- Body: ExperienceRecord object
PUT /api/experience/:id (admin only)
- Updates existing experience record
- Body: ExperienceRecord object
DELETE /api/experience/:id (admin only)
- Deletes experience record
GET /api/projects
- Returns all projects
- Query params: ?category=string (optional filter)
- Response: ProjectRecord[]
POST /api/projects (admin only)
- Creates new project
- Body: ProjectRecord object
PUT /api/projects/:id (admin only)
- Updates existing project
- Body: ProjectRecord object
DELETE /api/projects/:id (admin only)
- Deletes project
GET /api/skills
- Returns all skills categorized
- Response: SkillsData object
GET /api/certifications
- Returns all certifications
- Response: CertificationRecord[]
POST /api/skills (admin only)
- Updates skills data
- Body: SkillsData object
POST /api/certifications (admin only)
- Creates new certification
- Body: CertificationRecord object
GET /api/awards
- Returns all awards
- Response: AwardRecord[]
POST /api/awards (admin only)
- Creates new award
- Body: AwardRecord object
PUT /api/awards/:id (admin only)
- Updates existing award
- Body: AwardRecord object
DELETE /api/awards/:id (admin only)
- Deletes award
GET /api/patents
- Returns all patents
- Response: PatentRecord[]
POST /api/patents (admin only)
- Creates new patent
- Body: PatentRecord object
PUT /api/patents/:id (admin only)
- Updates existing patent
- Body: PatentRecord object
DELETE /api/patents/:id (admin only)
- Deletes patent
POST /api/contact
- Submits contact form
- Body: { name, email, subject, message }
- Response: { success: boolean, message: string }
GET /api/resume/download
- Downloads resume file
- Response: File download
POST /api/analytics/view
- Tracks page views
- Body: { page: string, timestamp: Date }
GET /api/analytics/stats (admin only)
- Returns view statistics
- Response: AnalyticsData object
{
name: string
title: string
email: string
phone: string
location: string
linkedin: string
github: string
bio: string
availability: string
}{
id: string
position: string
company: string
location: string
duration: string
type: string
achievements: string[]
startDate: Date
endDate: Date | null
}{
id: string
title: string
duration: string
technologies: string[]
description: string
achievements: string[]
category: string
githubUrl?: string
demoUrl?: string
featured: boolean
}- Create
/app/frontend/src/services/api.js - Implement axios-based API client
- Handle authentication and error states
- Replace mock functions with real API calls
- Replace direct mock imports with API calls
- Implement loading states for all sections
- Add error handling and retry logic
- Cache frequently accessed data
- Protected routes for content management
- Forms for adding/editing portfolio items
- File upload for resume management
- Basic authentication system
- Network error boundaries
- Fallback to cached data when possible
- User-friendly error messages
- Retry mechanisms for failed requests
- profiles - Personal information (singleton)
- education - Education records
- experience - Work experience records
- projects - Project portfolio
- skills - Skills and categories
- certifications - Certification records
- awards - Awards and achievements
- patents - Patent records
- contacts - Contact form submissions
- analytics - Page view tracking (optional)
- High Priority: Profile, Experience, Projects, Skills
- Medium Priority: Education, Awards, Patents, Certifications
- Low Priority: Contact form backend, Analytics, Admin panel
- Input validation for all form submissions
- Rate limiting on contact form
- CORS configuration for production
- Basic authentication for admin endpoints
- Data sanitization for user inputs
- Pagination for large datasets (future)
- Image optimization for project screenshots
- Caching frequently accessed data
- Efficient database queries with proper indexing
This contract serves as the bridge between the current mock implementation and the full-stack portfolio application.