Thank you for your interest in contributing to this portfolio project! This guide will help you get started with the development workflow and coding standards.
- Node.js 18+ or 20+
- pnpm (recommended) or npm
- Git
-
Clone the repository:
git clone https://github.com/deepakdevp/deepakdevp-portfolio.git cd deepakdevp-portfolio -
Install dependencies:
pnpm install # or npm install -
Run the development server:
pnpm dev # or npm run dev -
Open http://localhost:3000 in your browser.
This project uses several tools to maintain code quality:
- Biome - Fast linting and formatting
- TypeScript - Type checking
- Husky - Git hooks
- lint-staged - Pre-commit checks
When you commit changes, the following checks run automatically:
- Format - Biome formats all changed files
- Lint - Biome lints JavaScript/TypeScript files
- Type Check - TypeScript compiler validates types
# Development
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix linting issues
pnpm format # Format code with Biome
pnpm format:check # Check formatting
pnpm typecheck # Run TypeScript checks- Write TypeScript for all new files
- Use functional components with hooks
- Follow the existing code structure and patterns
- Maintain consistency with Once UI design system
- Write descriptive commit messages
src/
βββ app/ # Next.js pages (App Router)
βββ components/ # Reusable React components
β βββ ComponentName.tsx
β βββ ComponentName.module.scss
βββ resources/ # Configuration and content
β βββ content.js # Personal info and content
β βββ once-ui.config.js # UI configuration
βββ utils/ # Utility functions
- Use Once UI components over native HTML elements
- Co-locate styles - Keep
.module.scssfiles next to components - Export from index - Add exports to
src/components/index.ts - Props interfaces - Define TypeScript interfaces for component props
import React from 'react';
import { Flex, Text, Heading } from '@once-ui-system/core';
import styles from './ComponentName.module.scss';
interface ComponentProps {
title: string;
children?: React.ReactNode;
}
export const ComponentName: React.FC<ComponentProps> = ({ title, children }) => {
return (
<Flex className={styles.container}>
<Heading variant="display-strong-m">{title}</Heading>
{children && <Text>{children}</Text>}
</Flex>
);
};- Use SCSS modules for component-specific styles
- Reference Once UI tokens - Use CSS variables like
var(--neutral-alpha-weak) - Follow responsive patterns - Use
mobileDirection="column"for mobile layouts - Maintain theme consistency - Use theme-aware colors and spacing
Update src/resources/content.js to modify:
- Personal details (
personobject) - Work experience (
about.work.experiences) - Technical skills (
about.technical.skills) - Contact information (
contactobject)
Update src/resources/once-ui.config.js to change:
- Theme colors and styling (
styleobject) - Navigation routes (
routesobject) - Visual effects (
effectsobject) - Typography (
fontsobject)
Blog Posts:
- Create
.mdxfile insrc/app/blog/posts/ - Add frontmatter with metadata
- Use Once UI components in content
Projects:
- Create
.mdxfile insrc/app/work/projects/ - Add project images to
public/images/projects/ - Update project metadata
The .editorconfig file ensures consistent formatting across editors:
- 2-space indentation
- UTF-8 encoding
- LF line endings
- 100-character line length
- Trim trailing whitespace
biome.json configures linting and formatting:
- Double quotes for strings
- 2-space indentation
- 100-character line width
- Modern JavaScript/TypeScript rules
tsconfig.json includes:
- Strict type checking
- Path mapping (
@/*forsrc/*) - Modern ES features
- Next.js optimizations
- Type Check - Ensure no TypeScript errors
- Lint - Fix any linting issues
- Build - Generate production build
- Test - Verify build works locally
pnpm typecheck
pnpm lint
pnpm build
pnpm startRequired for full functionality:
NEXT_PUBLIC_BASE_URL- Site base URL for SEOPASSWORD- Route protection password (optional)
When reporting issues:
- Search existing issues first
- Use issue templates if available
- Provide detailed reproduction steps
- Include environment information
- Add screenshots for UI issues
- Fork the repository and create a feature branch
- Make your changes following the coding standards
- Test your changes locally
- Commit with descriptive messages
- Submit pull request with detailed description
This project follows the Conventional Commits specification for consistent, semantic commit messages.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat - A new feature for the user
- fix - A bug fix for the user
- docs - Documentation changes
- style - Code style changes (formatting, missing semi colons, etc)
- refactor - Code change that neither fixes a bug nor adds a feature
- perf - Performance improvements
- test - Adding missing tests or correcting existing tests
- build - Changes affecting build system or external dependencies
- ci - Changes to CI configuration files and scripts
- chore - Other changes that don't modify src or test files
- revert - Reverts a previous commit
- Use lowercase for type and scope
- Keep header under 72 characters
- Use imperative mood in description ("add" not "added")
- Don't end description with a period
- Include body for complex changes
- Reference issues in footer
# Feature
feat(components): add dark mode toggle component
# Bug fix
fix(auth): resolve login redirect issue
# Documentation
docs: update installation instructions in README
# Breaking change
feat!: migrate to Next.js 15 App Router
BREAKING CHANGE: Pages directory is no longer supportedCommon scopes for this project:
components- UI componentspages- Page-level changesauth- Authentication relatedapi- API routesconfig- Configuration filesstyles- Styling changescontent- Content updates
- Code follows existing patterns and conventions
- TypeScript types are properly defined
- Components use Once UI design system
- Styles are responsive and theme-aware
- Content updates are in configuration files
- Commit messages follow conventional format
- Pre-commit hooks pass (format, lint, typecheck)
- Build succeeds without errors
- Changes are tested locally
- Use Next.js
Imagecomponent for images - Implement proper loading states
- Optimize bundle size with dynamic imports
- Use Server Components where appropriate
- Use semantic HTML with appropriate
asprops - Include descriptive alt text for images
- Maintain proper heading hierarchy
- Ensure keyboard navigation works
- Test with screen readers
- Update meta tags for new pages
- Use structured data where appropriate
- Implement proper Open Graph images
- Maintain sitemap and robots.txt
- Validate user inputs
- Use environment variables for sensitive data
- Implement proper authentication flows
- Avoid exposing secrets in client code
- Documentation - Check
CLAUDE.mdand.cursorrules - Issues - Create an issue for bugs or questions
- Discussions - Use GitHub discussions for general questions
- Code Review - Tag maintainers for review feedback
- Next.js Documentation
- Once UI Documentation
- React Documentation
- TypeScript Handbook
- Biome Documentation
Thank you for contributing! π