A production-ready full-stack portfolio template for React developers transitioning from junior to mid-level. Features modern tooling, enterprise-grade security, comprehensive testing, Docker containerization, and CI/CD automation.
Status: V4 Complete - Performance optimized, Dockerized, and ready for deployment
Goal: Bridge the gap between full-stack bootcamp graduation and professional mid-level development.
This isn't just a portfolio templateβit's a progressive learning system designed for developers who:
- Completed a full-stack bootcamp or course
- Want to build a professional portfolio while leveling up their skills
- Are preparing for technical interviews
- Need to understand real-world production patterns
V1 β Basic structure (learn the stack)
V2 β Security & validation (think like a professional)
V3 β Testing & admin dashboard (build maintainable systems)
V4 β Performance & DevOps (think about scale and deployment)
Each phase teaches you not just how to code, but why we make architectural decisions.
- Architecture: MVC pattern, separation of concerns
- Security: JWT auth, input validation, rate limiting, XSS protection
- Testing: Unit tests, integration tests, coverage goals
- DevOps: Docker, CI/CD, monitoring, health checks
- Performance: Caching, compression, database indexing
- Real-world patterns: Error handling, logging, middleware stack
- Recent bootcamp grads: Solidify your learning with a real project
- Career changers: Build credibility with production-grade code
- Self-taught developers: Learn industry best practices
- Junior devs: Prepare for that first promotion
Result: You'll have a portfolio that impresses yourself AND the skills to back it up.
| Category | Technology |
|---|---|
| Framework | React 19.2.4 |
| Build Tool | Vite 7 |
| Styling | Tailwind CSS 4.2.1 |
| Animation | Framer Motion |
| Routing | React Router DOM 7 |
| Category | Technology |
|---|---|
| Runtime | Node.js 20 |
| Framework | Express 5.2.1 |
| Database | MongoDB + Mongoose 9.3.3 |
| Auth | JWT + bcryptjs |
| Security | Helmet, CORS, Rate Limiting |
| Validation | express-validator |
| Testing | Jest + Supertest |
| Performance | compression, node-cache |
| DevOps | Docker, GitHub Actions |
/
βββ client/ # React Frontend
β βββ src/
β β βββ api/ # API configuration
β β βββ components/ # Reusable components
β β β βββ buttons/
β β β β βββ PrimeBtn.jsx
β β β βββ ContactForm.jsx
β β β βββ Footer.jsx
β β β βββ Hero.jsx
β β β βββ Layout.jsx
β β β βββ Navbar.jsx
β β β βββ ProjectCard.jsx
β β β βββ ProjectList.jsx
β β β βββ SvgText.jsx
β β β βββ TerminalLoader.jsx
β β β βββ ThemeToggleBtn.jsx
β β β βββ Toast.jsx
β β βββ context/ # React Context
β β β βββ AuthContext.jsx
β β β βββ ThemeProvider.jsx
β β β βββ themeContext.js
β β βββ hooks/
β β β βββ use3DTilt.js # 3D mouse tilt effect
β β β βββ useInView.js # Intersection Observer
β β β βββ useTheme.js # Theme toggle hook
β β βββ pages/
β β β βββ Admin.jsx # Admin dashboard
β β β βββ About.jsx
β β β βββ Contact.jsx
β β β βββ Home.jsx
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ Work.jsx
β β βββ utils/
β β β βββ motionPresets.js
β β βββ assets/
β β βββ App.jsx
β β βββ AppRoutes.jsx
β β βββ main.jsx
β β βββ index.css # Tailwind v4 theme
β βββ .env.example
β βββ .prettierrc
β βββ eslint.config.js
β βββ index.html
β βββ package.json
β βββ vite.config.js
βββ server/ # Express Backend
β βββ src/
β β βββ config/ # Configuration
β β βββ controllers/ # Route handlers
β β βββ middleware/
β β β βββ authMiddleware.js # JWT + admin guard
β β β βββ cache.js # Response caching
β β β βββ errorHandler.js # Error handling
β β β βββ rateLimiter.js # Rate limiting
β β β βββ validation.js # Input validation
β β βββ models/ # Mongoose schemas
β β β βββ ContactMessage.js
β β β βββ Project.js
β β β βββ User.js
β β βββ routes/ # API routes
β βββ scripts/ # Seed scripts
β βββ .env.example
β βββ .env
β βββ .dockerignore
β βββ Dockerfile # Container image
β βββ mongo-init.js # DB initialization
β βββ package.json
β βββ server.js
βββ docker-compose.yml # Development stack
βββ docker-compose.prod.yml # Production stack
βββ .github/workflows/
β βββ ci.yml # Automated testing
β βββ deploy.yml # Automated deployment
βββ package.json # Root orchestrator
βββ .gitignore
βββ README.md
# 1. Install all dependencies (auto-installs client & server)
npm install
# 2. Run both servers simultaneously
npm run dev- Frontend: http://localhost:5173
- Backend: http://localhost:5001
| Script | Description |
|---|---|
npm run dev |
Run both client & server |
npm run dev:client |
Run only client |
npm run dev:server |
Run only server |
npm run format |
Format all code |
npm run lint |
Lint client code |
npm test |
Run Jest test suite |
npm run seed:projects |
Seed projects to MongoDB |
Copy server/.env.example to server/.env and configure:
# Server
MONGO_URI=mongodb://localhost:27017/portfolio
PORT=5001
NODE_ENV=development
CLIENT_URL=http://localhost:5173
# Admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=changeme123
# Auth (required for production)
JWT_SECRET=your-secret-key-hereCopy client/.env.example to client/.env (optional - has defaults):
VITE_API_URL=http://localhost:5001/api
VITE_APP_TITLE=port-exp-bolerplate| Method | Endpoint | Description |
|---|---|---|
| GET | /api/projects |
Get all projects |
| POST | /api/contact |
Submit contact form |
| POST | /api/users/register |
Register new user |
| POST | /api/users/login |
User login |
| GET | /api/health |
Health check |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users/profile |
Get user profile |
| PUT | /api/users/profile |
Update user profile |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/projects |
Create project |
| PUT | /api/projects/:id |
Update project |
| DELETE | /api/projects/:id |
Delete project |
| GET | /api/contact/messages |
Get all contact messages |
| PATCH | /api/contact/:id/read |
Mark message as read |
| DELETE | /api/contact/:id |
Delete contact message |
| GET | /api/users |
Get all registered users |
The client includes authentication context:
useAuth()hook for accessing auth state- Login/Register pages included
- Token stored in localStorage
V4 brings production-grade performance optimizations:
Optimized indexes for faster queries:
- User: email (unique), role
- Project: category+featured (compound), featured, createdAt
- ContactMessage: read+createdAt (compound), email
Smart caching with node-cache:
GET /api/projectsβ Cached 10 minutesGET /api/projects/:idβ Cached 5 minutesGET /api/contactβ Cached 2 minutes (admin)GET /api/usersβ Cached 5 minutes (admin)- Auto-invalidated on POST/PUT/DELETE
Gzip compression for all API responses via compression middleware:
- Reduces payload size by 60-80%
- Automatic content-type detection
Monitor system health:
GET /api/healthReturns: status, uptime, database connection, memory usage
Full Docker support for consistent development and deployment:
# Start entire stack (MongoDB + API)
docker-compose up
# Access API
curl http://localhost:5001/api/health
# Stop everything
docker-compose downserver/Dockerfile- Multi-stage optimized imagedocker-compose.yml- Development stackdocker-compose.prod.yml- Production stackserver/.dockerignore- Files to exclude from imageserver/mongo-init.js- Database initialization
- Consistency: Same environment on all machines
- Isolation: MongoDB runs in container, no local installation needed
- Portability: Deploy anywhere Docker runs
- Clean: One command removes everything
π Full Docker Guide: See docs/setup-docker.md
Automated testing and deployment with GitHub Actions:
.github/workflows/ci.yml:
- Runs on every PR and push to main
- Tests on Node 18 & 20
- Jest test suite with coverage
- Prettier format checking
- ESLint linting
- Docker image build
- Security audit
.github/workflows/deploy.yml:
- Builds Docker image on release
- Pushes to Docker Hub
- Automated deployment (configure for your platform)
- Health check verification
- Quality Gates: No broken code reaches production
- Automated Testing: Catch regressions early
- One-Click Deploys: Ship with confidence
- Consistent Environments: Same build everywhere
This template includes production-ready security features:
- Authentication endpoints: 5 requests per 15 minutes
- Contact form: 3 requests per hour
- Prevents brute force attacks and spam
All POST and PUT endpoints validate:
- Email format and normalization
- Password strength (minimum 8 characters, complexity requirements)
- Required field presence
- XSS sanitization via
.escape() - Prevents privilege escalation (role restricted to 'user')
- Helmet.js middleware adds HTTP security headers
- Protects against XSS, clickjacking, and other attacks
- CORS restricted to
CLIENT_URL
- Tokens include user ID and role
- Role-based access control (RBAC)
- Server-side token validation
- 7-day expiration (development) / 1-day (production)
The server includes a Jest test suite with unit and integration tests:
# Run all tests with coverage
npm test
# Run tests in watch mode
npm run test:watchserver/src/
βββ models/
β βββ __tests__/
β βββ User.test.js
β βββ ContactMessage.test.js
βββ controllers/
βββ __tests__/
βββ contactController.test.js
Tests cover:
- User model (password hashing, validation)
- ContactMessage model (schema validation)
- Contact controller (form submission, error handling)
cd server && npm run seedSet ADMIN_EMAIL and ADMIN_PASSWORD in server/.env.
npm run seed:projectsPopulates the database with sample projects for development.
This template now includes a complete design system inspired by the framer-port project with terminal-inspired aesthetics.
The design system uses OKLCH color space for consistent theming:
Brand Colors: for now
lagoon- Primary teal (#4ECDC4)coral- Warm accent (#FF6B6B)driftwood- Muted tan (#C4A77D)tide- Deep blue (#2C3E50)dusk- Golden highlight (#F39C12)
Semantic Colors:
surface-base- Main backgroundsurface-elevated- Card/elevated surfacestext-primary- Main texttext-muted- Secondary textheading- Headlinesbrand-primary- Primary actionsstatus-success- Success statesstatus-warning- Warning statesstatus-error- Error states
- Display: Playfair Display (headings)
- Sans: Inter (body text)
- Mono: JetBrains Mono (code/terminal)
- Dune: Dune Rise (special headings)
Dark/light mode is supported via ThemeProvider:
- Uses
data-themeattribute on<html>element - Persists preference to localStorage
- Respects system preference on first visit
// Using the theme hook
import useTheme from "./hooks/useTheme";
const { isDarkMode, toggleDarkMode } = useTheme();Framer Motion presets available in utils/motionPresets.js:
FADE_UP,FADE_DOWN,FADE_IN- Entry animationsHOVER_SCALE,HOVER_LIFT- Hover effectsPROJECT_CARD_ENTRY- 3D card revealSTAGGER_CONTAINER,STAGGER_SLOW- Staggered childrenSPRING_SOFT,SPRING_SNAPPY- Spring transitionsTRANSITION_FAST,TRANSITION_NORMAL,TRANSITION_SLOW- Duration presets
The use3DTilt hook provides mouse-driven 3D rotation:
const { rotateX, rotateY, handleMouseMove, handleMouseLeave, isHovered } =
use3DTilt({
stiffness: 150, // Spring stiffness
damping: 20, // Spring damping
rotationRange: 8, // Max rotation in degrees
mouseRange: [-0.5, 0.5], // Input range
elementRelative: true, // Use element vs window coords
disabled: false, // Disable for prefers-reduced-motion
});
// Apply to motion.div
<motion.div
style={{ rotateX, rotateY, perspective: 1000 }}
onMouseMove={handleMouseMove}
onMouseLeave={handleMouseLeave}
/>;Components like ContactForm and TerminalLoader use terminal aesthetics:
- Command-style input labels (
$prefix) - Traffic light window controls
- Monospace typography
- Status output areas
The PrimeBtn component supports:
variant: 'solid', 'outline', 'gradient'tone: 'primary', 'secondary', 'white'
<PrimeBtn variant="gradient" tone="primary">
Click Me
</PrimeBtn>This template uses Tailwind CSS v4, which no longer requires tailwind.config.js. Configuration is done directly in CSS using @import "tailwindcss"; with @theme directive.
The design system defines these custom properties in index.css:
- Font families (
--font-dune,--font-mono, etc.) - Color scales (
--color-primary-*,--color-avocado-*, etc.) - Semantic colors (
--color-surface-base,--color-text-primary, etc.) - Animation tokens (
--animate-blink,--animate-grain,--animate-glow-pulse) - Easing curves (
--ease-smooth,--ease-spring) - Duration tokens (
--duration-fast,--duration-normal,--duration-slow)This template uses Tailwind CSS v4, which no longer requirestailwind.config.js. Configuration is done directly in CSS using@import "tailwindcss";with@themedirective.
The design system defines these custom properties in index.css:
- Font families (
--font-dune,--font-mono, etc.) - Color scales (
--color-primary-*,--color-avocado-*, etc.) - Semantic colors (
--color-surface-base,--color-text-primary, etc.) - Animation tokens (
--animate-blink,--animate-grain,--animate-glow-pulse) - Easing curves (
--ease-smooth,--ease-spring) - Duration tokens (
--duration-fast,--duration-normal,--duration-slow)
MIT