Installation Guide

Set up and run my portfolio projects locally for development or testing.

šŸ“‹ Prerequisites

Required Software

  • • Node.js (v18.0.0 or higher)
  • • npm or yarn package manager
  • • Git for version control
  • • VS Code (recommended) or any code editor

Optional Tools

  • • Docker for containerized development
  • • PostgreSQL for database projects
  • • Redis for caching layers

⚔ Quick Setup

1. Clone the Repository

# Clone the main portfolio repository
git clone https://github.com/thakur-ganeshsingh/portfolio.git

# Navigate to the project directory
cd portfolio

2. Install Dependencies

# Using npm
npm install

# Or using yarn
yarn install

3. Environment Setup

# Copy environment variables
cp .env.example .env.local

# Edit environment variables
# Add your API keys and configuration

4. Start Development Server

# Start the development server
npm run dev

# Open your browser to
# http://localhost:3000

šŸ”§ Environment Configuration

Create a .env.local file in the root directory with the following variables:

# Next.js Configuration NEXT_PUBLIC_APP_URL=http://localhost:3000 NEXT_PUBLIC_SITE_NAME="Thakur Ganeshsingh Journey Site" # API Configuration NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api API_SECRET_KEY=your-secret-key-here # Database (Optional) DATABASE_URL=postgresql://username:password@localhost:5432/portfolio REDIS_URL=redis://localhost:6379 # Third-party Services (Optional) OPENAI_API_KEY=your-openai-key GITHUB_TOKEN=your-github-token ANALYTICS_ID=your-analytics-id

šŸ“ Project Structure

portfolio/ ā”œā”€ā”€ app/ # Next.js app directory │ ā”œā”€ā”€ docs/ # Documentation pages │ ā”œā”€ā”€ api/ # API routes │ └── globals.css # Global styles ā”œā”€ā”€ components/ # React components │ ā”œā”€ā”€ ui/ # UI components │ ā”œā”€ā”€ docs/ # Documentation components │ └── shared/ # Shared components ā”œā”€ā”€ data/ # Static data files │ ā”œā”€ā”€ skillsData.js # Skills and projects │ ā”œā”€ā”€ projectsData.ts # Project information │ └── docsData.ts # Documentation data ā”œā”€ā”€ lib/ # Utility functions ā”œā”€ā”€ public/ # Static assets ā”œā”€ā”€ src/ # Source configuration └── shared/ # Shared utilities

šŸ› ļø Available Scripts

npm run dev

Starts the development server with hot reloading at http://localhost:3000

npm run build

Creates an optimized production build of the application

npm run start

Starts the production server (requires npm run build first)

npm run lint

Runs ESLint to check for code quality issues

npm run test

Runs the test suite using Jest and React Testing Library

🐳 Docker Setup (Optional)

For containerized development, you can use Docker:

# Build the Docker image
docker build -t portfolio .

# Run the container
docker run -p 3000:3000 portfolio

# Or use Docker Compose
docker-compose up

šŸ” Troubleshooting

Common Issues

  • • Port 3000 already in use: Kill the process or use a different port
  • • Module not found: Delete node_modules and run npm install again
  • • Build errors: Check that all environment variables are set correctly
  • • Styling issues: Clear browser cache and restart the dev server

Getting Help

If you encounter issues that aren't covered here:

  • • Check the GitHub issues for similar problems
  • • Contact me directly at thakur.ganeshsingh@gmail.com
  • • Connect with me on LinkedIn for technical discussions

šŸŽÆ Next Steps

Now that you have the project running locally, explore these areas:

Explore the Codebase

  • • Review the component architecture
  • • Check out the API implementation
  • • Understand the data structure

Learn More

  • • Read about my projects in detail
  • • Explore the API documentation
  • • Check out my technical skills
Use Ctrl + ← / → to navigate