|
| 1 | +# Regan Maharjan Portfolio Website |
1 | 2 |
|
2 | | - # Regan Maharjan Portfolio Website |
| 3 | +A modern, accessible portfolio website built with React, TypeScript, and Vite. This project showcases work, stories of impact, adventures, photography, and more through a beautiful, responsive interface. |
3 | 4 |
|
4 | | - This is a code bundle for Regan Maharjan Portfolio Website. The original project is available at https://www.figma.com/design/5mIwsMzBMF9bvvj9PrAFOF/Regan-Maharjan-Portfolio-Website. |
| 5 | +**Original Design:** [Figma Design](https://www.figma.com/design/5mIwsMzBMF9bvvj9PrAFOF/Regan-Maharjan-Portfolio-Website) |
5 | 6 |
|
6 | | - ## Running the code |
| 7 | +## 🚀 Quick Start |
7 | 8 |
|
8 | | - Run `npm i` to install the dependencies. |
| 9 | +### Prerequisites |
9 | 10 |
|
10 | | - Run `npm run dev` to start the development server. |
11 | | - |
| 11 | +- Node.js (v18 or higher) |
| 12 | +- npm or yarn |
| 13 | + |
| 14 | +### Installation |
| 15 | + |
| 16 | +1. **Clone the repository** |
| 17 | + ```bash |
| 18 | + git clone https://github.com/rayraycodes/rayraycodes.github.io.git |
| 19 | + cd rayraycodes.github.io |
| 20 | + ``` |
| 21 | + |
| 22 | +2. **Install dependencies** |
| 23 | + ```bash |
| 24 | + npm install |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Start development server** |
| 28 | + ```bash |
| 29 | + npm run dev |
| 30 | + ``` |
| 31 | + |
| 32 | + The site will open at `http://localhost:3000` |
| 33 | + |
| 34 | +4. **Build for production** |
| 35 | + ```bash |
| 36 | + npm run build |
| 37 | + ``` |
| 38 | + |
| 39 | + The production build will be in the `build/` directory. |
| 40 | + |
| 41 | +## 📁 Project Structure |
| 42 | + |
| 43 | +``` |
| 44 | +rayraycodes.github.io/ |
| 45 | +├── src/ |
| 46 | +│ ├── components/ # React components |
| 47 | +│ │ ├── pages/ # Page components |
| 48 | +│ │ ├── ui/ # Reusable UI components (shadcn/ui) |
| 49 | +│ │ ├── branding/ # Branding components (logo, etc.) |
| 50 | +│ │ ├── decorative/ # Decorative elements (prayer flags, silhouettes) |
| 51 | +│ │ ├── photogallery/ # Photo gallery components |
| 52 | +│ │ └── figma/ # Figma-specific components |
| 53 | +│ ├── data/ # Content data (stories, projects, etc.) |
| 54 | +│ ├── config/ # Configuration files |
| 55 | +│ ├── utils/ # Utility functions |
| 56 | +│ ├── styles/ # Global styles |
| 57 | +│ ├── App.tsx # Main app component with routing |
| 58 | +│ └── main.tsx # Entry point |
| 59 | +├── public/ # Static assets |
| 60 | +├── build/ # Production build output |
| 61 | +└── package.json # Dependencies and scripts |
| 62 | +``` |
| 63 | + |
| 64 | +## 🧩 Component Architecture |
| 65 | + |
| 66 | +### Core Components |
| 67 | + |
| 68 | +#### **Pages** (`src/components/pages/`) |
| 69 | +Main page components that represent different sections of the site: |
| 70 | + |
| 71 | +- **Home.tsx** - Landing page with hero section |
| 72 | +- **About.tsx** - About page |
| 73 | +- **Experience.tsx** - Work experience timeline |
| 74 | +- **Projects.tsx** - Projects listing page |
| 75 | +- **ProjectDetail.tsx** - Individual project detail page |
| 76 | +- **Impact.tsx** - Stories of Impact listing |
| 77 | +- **StoryDetail.tsx** - Individual impact story detail |
| 78 | +- **StoriesOfAdventure.tsx** - Adventure stories listing with category filters |
| 79 | +- **StoryOfAdventureDetail.tsx** - Individual adventure story detail |
| 80 | +- **Photography.tsx** - Photography gallery |
| 81 | +- **Contact.tsx** - Contact page |
| 82 | +- **Accessibility.tsx** - Accessibility information |
| 83 | +- **CMS.tsx** - Content management interface |
| 84 | + |
| 85 | +#### **UI Components** (`src/components/ui/`) |
| 86 | +Reusable UI components built with Radix UI and styled with Tailwind CSS: |
| 87 | + |
| 88 | +- **button.tsx** - Button component with variants |
| 89 | +- **card.tsx** - Card container component |
| 90 | +- **dialog.tsx** - Modal dialogs |
| 91 | +- **InstagramFrame.tsx** - Instagram-style image frame |
| 92 | +- And 40+ other components from shadcn/ui |
| 93 | + |
| 94 | +#### **Layout Components** |
| 95 | + |
| 96 | +- **Navigation.tsx** - Main navigation bar |
| 97 | +- **Footer.tsx** - Site footer |
| 98 | +- **LogoMark.tsx** - Logo component |
| 99 | + |
| 100 | +#### **Decorative Components** (`src/components/decorative/`) |
| 101 | + |
| 102 | +- **PrayerFlags.tsx** - Tibetan prayer flags SVG component |
| 103 | +- **HimalayanSilhouette.tsx** - Mountain silhouette SVG |
| 104 | + |
| 105 | +#### **Photo Gallery** (`src/components/photogallery/`) |
| 106 | + |
| 107 | +- **PhotoGallery.tsx** - Main photo gallery component |
| 108 | +- **PhotoGrid.tsx** - Grid layout for photos |
| 109 | +- **types.ts** - TypeScript types for gallery |
| 110 | + |
| 111 | +### Content Management |
| 112 | + |
| 113 | +All content is centralized in **`src/data/content.ts`**. This file contains: |
| 114 | + |
| 115 | +- Navigation links |
| 116 | +- Home page content |
| 117 | +- Projects data |
| 118 | +- Impact stories |
| 119 | +- Adventure stories |
| 120 | +- Photography gallery |
| 121 | +- Contact information |
| 122 | +- Labels and translations |
| 123 | + |
| 124 | +## 🎨 Customization Guide |
| 125 | + |
| 126 | +### Adding a New Story of Impact |
| 127 | + |
| 128 | +1. Open `src/data/content.ts` |
| 129 | +2. Find the `impact.stories` array |
| 130 | +3. Add a new story object: |
| 131 | + |
| 132 | +```typescript |
| 133 | +{ |
| 134 | + "id": "unique-story-id", |
| 135 | + "title": "Story Title", |
| 136 | + "excerpt": "Brief description", |
| 137 | + "date": "2024", |
| 138 | + "icon": "Heart", // Options: Globe, BookOpen, Heart, Laptop, Zap, Users |
| 139 | + "theme": "blue", // Options: blue, green, purple, indigo, teal, orange |
| 140 | + "content": { |
| 141 | + "description": "Full story description", |
| 142 | + "work": [ |
| 143 | + "What you did 1", |
| 144 | + "What you did 2" |
| 145 | + ], |
| 146 | + "impact": "The impact this story created", |
| 147 | + "images": ["/path/to/image.jpg"], // Optional |
| 148 | + "hasStats": false, // Optional |
| 149 | + "stats": [ // Optional, only if hasStats is true |
| 150 | + { "value": "100", "label": "Students Reached" } |
| 151 | + ] |
| 152 | + } |
| 153 | +} |
| 154 | +``` |
| 155 | + |
| 156 | +### Adding a New Adventure Story |
| 157 | + |
| 158 | +1. Open `src/data/content.ts` |
| 159 | +2. Find the `storiesOfAdventure.stories` array |
| 160 | +3. Add a new story: |
| 161 | + |
| 162 | +```typescript |
| 163 | +{ |
| 164 | + "id": "unique-story-id", |
| 165 | + "title": "Adventure Title", |
| 166 | + "excerpt": "Brief description", |
| 167 | + "date": "Dec 2025", |
| 168 | + "icon": "Heart", |
| 169 | + "theme": "green", // Maps to category: green=National Parks, blue=Mountains, etc. |
| 170 | + "content": { |
| 171 | + "description": "Story description (can be string or array of paragraphs)", |
| 172 | + "work": ["Activity 1", "Activity 2"], |
| 173 | + "impact": "Reflection on the experience", |
| 174 | + "images": [ |
| 175 | + { |
| 176 | + "url": "/assets/path/to/image.jpg", |
| 177 | + "alt": "Image description", |
| 178 | + "caption": "Optional caption" |
| 179 | + } |
| 180 | + ] |
| 181 | + } |
| 182 | +} |
| 183 | +``` |
| 184 | + |
| 185 | +**Theme Categories:** |
| 186 | +- `blue` → Mountains |
| 187 | +- `green` → National Parks |
| 188 | +- `purple` → Lakes & Water |
| 189 | +- `indigo` → Forests |
| 190 | +- `teal` → Seasons |
| 191 | +- `orange` → Cycling |
| 192 | +- `red` → Running |
| 193 | + |
| 194 | +### Adding a New Project |
| 195 | + |
| 196 | +1. Open `src/data/content.ts` |
| 197 | +2. Find the `projects.projects` array |
| 198 | +3. Add a new project: |
| 199 | + |
| 200 | +```typescript |
| 201 | +{ |
| 202 | + "id": "unique-project-id", |
| 203 | + "title": "Project Title", |
| 204 | + "excerpt": "Brief description", |
| 205 | + "thumbnail": "/path/to/thumbnail.jpg", |
| 206 | + "tags": ["React", "TypeScript"], |
| 207 | + "content": { |
| 208 | + "problem": "The challenge", |
| 209 | + "approach": "How you approached it", |
| 210 | + "solution": "Technical solution", |
| 211 | + "result": "Outcome achieved" |
| 212 | + }, |
| 213 | + "links": { |
| 214 | + "demo": "https://demo-url.com", // Optional |
| 215 | + "repo": "https://github.com/repo" // Optional |
| 216 | + } |
| 217 | +} |
| 218 | +``` |
| 219 | + |
| 220 | +### Updating Navigation |
| 221 | + |
| 222 | +Edit `src/data/content.ts` → `navigation.links` array: |
| 223 | + |
| 224 | +```typescript |
| 225 | +{ |
| 226 | + "path": "/your-path", |
| 227 | + "label": "Your Label" |
| 228 | +} |
| 229 | +``` |
| 230 | + |
| 231 | +### Changing Site Name |
| 232 | + |
| 233 | +Edit `src/data/content.ts` → `navigation.siteName` |
| 234 | + |
| 235 | +### Adding Images |
| 236 | + |
| 237 | +1. Place images in `public/assets/` or `src/assets/` |
| 238 | +2. Reference them in content as `/assets/your-image.jpg` |
| 239 | +3. For build, images are automatically copied to `build/assets/` |
| 240 | + |
| 241 | +## 🎯 Key Features |
| 242 | + |
| 243 | +### Story Management |
| 244 | +- **Stories of Impact**: Showcase meaningful work and projects |
| 245 | +- **Stories of Adventure**: Share travel and adventure experiences |
| 246 | +- Category filtering for adventure stories |
| 247 | +- Related stories suggestions on detail pages |
| 248 | + |
| 249 | +### Photo Gallery |
| 250 | +- Responsive grid layout |
| 251 | +- Image optimization |
| 252 | +- Caption support |
| 253 | + |
| 254 | +### Accessibility |
| 255 | +- WCAG 2.1 compliant |
| 256 | +- Keyboard navigation |
| 257 | +- Screen reader support |
| 258 | +- Semantic HTML |
| 259 | + |
| 260 | +### Performance |
| 261 | +- Vite for fast builds |
| 262 | +- Code splitting |
| 263 | +- Optimized asset loading |
| 264 | +- Lazy loading images |
| 265 | + |
| 266 | +### SEO |
| 267 | +- Meta tags management |
| 268 | +- Open Graph tags |
| 269 | +- Twitter Card support |
| 270 | +- Semantic HTML structure |
| 271 | + |
| 272 | +## 🛠️ Technologies Used |
| 273 | + |
| 274 | +- **React 18** - UI framework |
| 275 | +- **TypeScript** - Type safety |
| 276 | +- **Vite** - Build tool and dev server |
| 277 | +- **React Router** - Client-side routing |
| 278 | +- **Tailwind CSS** - Styling |
| 279 | +- **Radix UI** - Accessible component primitives |
| 280 | +- **Motion (Framer Motion)** - Animations |
| 281 | +- **Lucide React** - Icons |
| 282 | + |
| 283 | +## 📝 Content Management System |
| 284 | + |
| 285 | +The site includes a built-in CMS at `/cms` route that allows you to: |
| 286 | +- View all content |
| 287 | +- Edit content directly in the browser |
| 288 | +- Save changes to `content.ts` |
| 289 | + |
| 290 | +**Note:** CMS changes are saved locally. For production, edit `src/data/content.ts` directly. |
| 291 | + |
| 292 | +## 🚢 Deployment |
| 293 | + |
| 294 | +### GitHub Pages |
| 295 | + |
| 296 | +The site is configured for GitHub Pages deployment: |
| 297 | + |
| 298 | +1. Push code to `master` branch |
| 299 | +2. GitHub Actions will automatically build and deploy |
| 300 | +3. Site will be available at `https://yourusername.github.io` |
| 301 | + |
| 302 | +### Manual Deployment |
| 303 | + |
| 304 | +1. Build the project: |
| 305 | + ```bash |
| 306 | + npm run build |
| 307 | + ``` |
| 308 | + |
| 309 | +2. Deploy the `build/` directory to your hosting service |
| 310 | + |
| 311 | +## 🎨 Styling |
| 312 | + |
| 313 | +The project uses Tailwind CSS with custom configuration. Key styling features: |
| 314 | + |
| 315 | +- **Design System**: Consistent spacing, colors, and typography |
| 316 | +- **Dark Mode Support**: Built-in theme switching (if configured) |
| 317 | +- **Responsive Design**: Mobile-first approach |
| 318 | +- **Custom Utilities**: Project-specific utility classes |
| 319 | + |
| 320 | +## 📱 Responsive Design |
| 321 | + |
| 322 | +The site is fully responsive with breakpoints: |
| 323 | +- Mobile: Default |
| 324 | +- Tablet: `md:` (768px+) |
| 325 | +- Desktop: `lg:` (1024px+) |
| 326 | + |
| 327 | +## 🔧 Development Tips |
| 328 | + |
| 329 | +### Hot Reload |
| 330 | +Changes to components and styles will hot-reload automatically. |
| 331 | + |
| 332 | +### Content Updates |
| 333 | +Changes to `content.ts` require a page refresh to see updates. |
| 334 | + |
| 335 | +### Image Optimization |
| 336 | +- Use optimized images (WebP, compressed JPG) |
| 337 | +- Place images in `public/assets/` for static serving |
| 338 | +- Use `getImageUrl()` utility for dynamic image paths |
| 339 | + |
| 340 | +### TypeScript |
| 341 | +The project is fully typed. If you add new content structures, update the TypeScript interfaces in the relevant component files. |
| 342 | + |
| 343 | +## 📄 License |
| 344 | + |
| 345 | +This project is private and proprietary. |
| 346 | + |
| 347 | +## 🤝 Contributing |
| 348 | + |
| 349 | +This is a personal portfolio website. For questions or suggestions, please open an issue or contact the owner. |
| 350 | + |
| 351 | +## 📞 Support |
| 352 | + |
| 353 | +For issues or questions: |
| 354 | +1. Check existing issues on GitHub |
| 355 | +2. Review the code comments |
| 356 | +3. Contact through the site's contact page |
| 357 | + |
| 358 | +--- |
| 359 | + |
| 360 | +**Built with ❤️ using React, TypeScript, and modern web technologies.** |
0 commit comments