This project is licensed under the CC BY-NC-ND 4.0 license. It is intended for educational and reference purposes only. No reuse, modification, or commercial use is permitted.
AI-powered resume management platform for technical professionals.
Layer | Technology |
---|---|
Frontend | Next.js 15, Shadcn/UI, Tailwind CSS 4 |
Editor | Monaco Editor, Markdown Editor |
AI | Vercel AI SDK, OpenAI, Ollama |
Database | Drizzle ORM + Neon PostgreSQL |
Auth | NextAuth.js v5 |
Testing | Playwright, Jest, MSW |
Package Manager | pnpm |
Code Quality | ESLint, Husky |
CI/CD | GitHub Actions |
- Node.js 18+
- pnpm (enforced via preinstall hook)
- Neon Database account
- Git
# Clone and install
git clone https://github.com/yourusername/resumeforge.git
cd resumeforge
pnpm install
# Setup environment
cp .env.example .env.local
# Configure your Neon database URL and other variables
# Generate database schema
pnpm run db:generate
# Start development server (with Turbopack)
pnpm run dev
Command | Description |
---|---|
pnpm run dev |
Start development server with Turbopack |
pnpm run build |
Build for production |
pnpm run start |
Start production server |
pnpm run lint |
Run ESLint |
pnpm run typecheck |
TypeScript type checking |
pnpm run db:generate |
Generate Drizzle schema |
pnpm run db:migrate |
Create migration files |
pnpm run db:run-migrations |
Run migrations on database |
pnpm run db:studio |
Open Drizzle Studio |
pnpm run test |
Run Playwright tests |
pnpm run test:ui |
Run Playwright tests with UI |
pnpm run test:failed |
Re-run only failed tests |
pnpm run show-report |
Show Playwright test report |
Tests are located in the /tests
directory and use Playwright for end-to-end testing.
# Run all tests
pnpm run test
# Run tests with UI mode
pnpm run test:ui
# Re-run only failed tests
pnpm run test:failed
# Show test report
pnpm run show-report
# Run specific test file
pnpm exec playwright test auth.spec.ts
tests/
βββ auth.spec.ts # Authentication flows
βββ markdowntailor.spec.ts # Resume creation/editing
βββ ai-suggestions.spec.ts # AI integration tests
βββ fixtures/ # Test data and utilities
// Example test structure
import { test, expect } from '@playwright/test';
test.describe('markdowntailor', () => {
test('should create a new resume', async ({ page }) => {
// Test implementation
});
});
Pre-commit hooks are configured to run:
- ESLint validation
- TypeScript type checking
- Staged file linting
# Hooks are automatically installed after pnpm install
# Husky is initialized via the prepare script
ESLint is configured with:
- Next.js 15 recommended rules
- TypeScript support
- Tailwind CSS class ordering
- Custom rules for project conventions
# Run linting
pnpm run lint
# TypeScript checking
pnpm run typecheck
Located in .github/workflows/ci.yml
:
# Workflow triggers
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
-
Setup & Dependencies
- Node.js 18 setup
- Cache npm dependencies
- Install dependencies
-
Code Quality Checks
- ESLint validation
- TypeScript type checking
-
Build Verification
- Next.js production build
- Build artifact validation
-
Testing
- Playwright test execution
- Jest unit tests
- Test result reporting
- Screenshot/video artifacts on failure
-
Security Scanning
- Dependency vulnerability check
- SAST scanning (planned)
Required environment variables for CI:
# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/resumeforge
# AI Integration
OPENAI_API_KEY=sk-...
OLLAMA_BASE_URL=http://localhost:11434 # Optional
# Authentication
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000
Schema definitions are in /src/db/schema.ts
:
# Generate schema changes
pnpm run db:generate
# Create migration files
pnpm run db:migrate
# Open Drizzle Studio
pnpm run db:studio
We use a structured approach to database migrations:
# Generate migration files after schema changes
pnpm run db:migrate
# Push schema directly to database (development only)
# Note: Always use migrations for production
pnpm run db:push
Our migration system is designed with the following features:
-
Separation of concerns:
- Migration generation (
db:migrate
) - Migration execution (
db:run-migrations
)
- Migration generation (
-
Explicit control:
- Migrations don't automatically run on app startup
- Proper error handling and connection management
- Connection pooling with timeouts and error handling
-
Production-ready:
- Safe for CI/CD environments
- Connection pool is properly closed after migrations
- Error handling prevents incomplete migrations
main
- Production-ready codedevelop
- Integration branchfeature/*
- Feature developmenthotfix/*
- Production hotfixes
Using conventional commits:
feat: add AI suggestion endpoint
fix: resolve Monaco editor crash
docs: update deployment guide
test: add markdowntailor e2e tests
- Create feature branch from
develop
- Implement changes with tests
- Ensure all CI checks pass
- Request code review
- Merge to
develop
after approval
Development
# Local development with Neon database
pnpm run dev
Staging
- Deployed via GitHub Actions on push to
develop
- Uses Neon branch database
- Environment:
staging
Production
- Deployed via GitHub Actions on push to
main
- Uses Neon main database
- Environment:
production
Next.js build settings in next.config.js
:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone', // For Docker deployment
experimental: {
serverComponentsExternalPackages: ['@prisma/client']
}
}
# Multi-stage build for production
FROM node:18-alpine AS builder
# Build steps...
FROM node:18-alpine AS runner
# Runtime configuration...
# Type checking
pnpm run typecheck
# Debug Playwright tests
pnpm run test:ui
# Database debugging
pnpm run db:studio
# Show test reports
pnpm run show-report
- Client-side errors: Error boundaries
- Server-side errors: Centralized error handling
- API errors: Standardized error responses
src/
βββ app/ # Next.js App Router pages
βββ components/ # React components
β βββ ui/ # Shadcn/UI components
β βββ features/ # Feature-specific components
βββ lib/ # Utilities and configurations
β βββ db/ # Database schema and utilities
β βββ ai/ # AI SDK integration
β βββ utils/ # Helper functions
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript type definitions
tests/ # Playwright tests
docs/ # Additional documentation
Initializing the Database Password
To initialize the database password in AWS Secrets Manager, you would typically do it in one of the following ways:
-
Manually via AWS Console:
- Navigate to AWS Secrets Manager in the AWS Management Console.
- Create a new secret for the database password and enter the desired password manually.
-
Using an Initialization Script:
- If you'd like to automate the setup, you can create a script (e.g., using AWS CLI or SDK) to create the secret with the desired password during your infrastructure provisioning process or during a CI/CD pipeline execution.
Example of setting the secret via AWS CLI:
aws secretsmanager create-secret --name "your_project_name-your_env-db-password" --secret-string "your_secure_password"
- Familiarity with Next.js App Router
- Experience with TypeScript
- Understanding of Playwright testing
- Fork the repository
- Follow local development setup
- Create feature branch
- Implement changes with tests
- Ensure all CI checks pass
- Submit pull request
- TypeScript strict mode
- ESLint + Prettier configuration
- Conventional commit messages
- Test coverage for new features