Prerequisites
Before you begin, ensure you have the following installed:Node.js
pnpm Package Manager
Version 10.4.1 or higher is required.Install pnpm globally:Verify installation:
Initial Setup
Install Dependencies
Install all project dependencies using pnpm:This will install dependencies for all packages in the monorepo.
Monorepo Structure
GitFolio uses a monorepo structure powered by Turborepo and pnpm workspaces:Development Commands
GitFolio uses Turborepo to manage tasks across the monorepo. Here are the key commands:Working with Templates
The templates package is where all portfolio templates live.Templates Package Structure
Building the Templates Package
Turborepo Tasks
GitFolio uses Turborepo to efficiently run tasks across packages. Key tasks include:build
build
Builds all packages with proper dependency ordering. Uses caching to speed up repeated builds.
dev
dev
Starts development servers with hot reload. Runs persistently and doesn’t use cache.
lint
lint
Runs ESLint across all packages. Results are cached for efficiency.
test
test
Runs test suites. Coverage reports are generated in
coverage/ directory.Using Package Filters
Turborepo allows you to run commands for specific packages using the--filter flag:
Troubleshooting
Dependencies Not Installing
Dependencies Not Installing
If you encounter issues during
pnpm install:- Ensure you’re using pnpm version 10.4.1 or higher
- Clear pnpm cache:
pnpm store prune - Delete
node_modulesandpnpm-lock.yaml, then reinstall - Make sure Node.js version is 20 or higher
Build Failures
Build Failures
If builds are failing:
- Check TypeScript errors: Look for type issues in your code
- Clear Turborepo cache:
rm -rf .turbo - Rebuild from scratch:
pnpm run build - Ensure all dependencies are installed
Dev Server Not Starting
Dev Server Not Starting
If the dev server won’t start:
- Check if port 3000 is already in use
- Verify environment variables are set correctly
- Check console for error messages
- Try running with verbose logging
Hot Reload Not Working
Hot Reload Not Working
If changes aren’t reflecting:
- Restart the dev server
- Clear browser cache
- Check if files are being watched (look for file watcher limits on Linux)
- Ensure you’re editing files in the correct package
Editor Setup
For the best development experience, we recommend using Visual Studio Code with the following extensions:
- ESLint
- Prettier
- TypeScript and JavaScript Language Features
- Tailwind CSS IntelliSense
Next Steps
Now that your development environment is set up:- Review our Code Style Guide
- Read the Contributing Guidelines
- Start creating your first template!