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