Skip to content

Commit 173c2ef

Browse files
add README.md with project overview, features, installation instructions, and contribution guidelines
Signed-off-by: Shahm Najeeb <Shahm_Najeeb@outlook.com>
1 parent 65e0617 commit 173c2ef

File tree

1 file changed

+174
-0
lines changed

1 file changed

+174
-0
lines changed

README.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# WESMUN Photo Gallery
2+
3+
A modern, elegant photo gallery web application built for WESMUN (Wesgreen Model United Nations) to showcase event
4+
photos. Built with Next.js 16, React 19, TypeScript, and Tailwind CSS.
5+
6+
## Features
7+
8+
- **Organized Gallery**: Browse photos organized by different committees and categories
9+
- **Smart Filtering**: Filter images by committee/category with an intuitive filter bar
10+
- **Multi-Select**: Select multiple images at once for batch operations
11+
- **Bulk Download**: Download selected images as a ZIP file
12+
- **Elegant UI**: Clean, modern interface with gold accent theme (#D4AF37)
13+
- **Responsive Design**: Fully responsive layout that works on all devices
14+
- **Optimized Performance**: Server-side rendering with Next.js for fast loading
15+
- **Image Metadata**: Automatic image dimension detection and optimization
16+
17+
## Getting Started
18+
19+
### Prerequisites
20+
21+
- Node.js 18+ installed
22+
- npm or yarn package manager
23+
24+
### Installation
25+
26+
1. Clone the repository:
27+
```bash
28+
git clone <repository-url>
29+
cd "WESMUN Gallery"
30+
```
31+
32+
2. Install dependencies:
33+
```bash
34+
npm install
35+
```
36+
37+
3. Generate the gallery manifest:
38+
```bash
39+
npm run build-manifest
40+
```
41+
42+
4. Run the development server:
43+
```bash
44+
npm run dev
45+
```
46+
47+
5. Open [http://localhost:3000](http://localhost:3000) in your browser
48+
49+
## Project Structure
50+
51+
```
52+
WESMUN Gallery/
53+
├── app/ # Next.js app directory
54+
│ ├── api/ # API routes
55+
│ │ └── download/ # Image download endpoint
56+
│ ├── layout.tsx # Root layout
57+
│ ├── page.tsx # Main gallery page
58+
│ └── globals.css # Global styles
59+
├── components/ # React components
60+
│ ├── gallery/ # Gallery-specific components
61+
│ │ ├── gallery-client-wrapper.tsx
62+
│ │ ├── gallery-client.tsx
63+
│ │ ├── gallery-grid.tsx
64+
│ │ ├── gallery-item.tsx
65+
│ │ ├── filter-bar.tsx
66+
│ │ └── download-toolbar.tsx
67+
│ ├── ui/ # Reusable UI components
68+
│ ├── footer.tsx
69+
│ └── deployement-info.tsx
70+
├── lib/ # Utility functions
71+
│ ├── gallery.ts # Gallery data management
72+
│ └── ui.ts # UI utilities
73+
├── public/ # Static assets
74+
│ ├── images/ # Gallery images (organized by folder)
75+
│ ├── gallery-manifest.json # Auto-generated image metadata
76+
│ └── wesmun.svg # WESMUN logo
77+
├── scripts/ # Build scripts
78+
│ └── generate-gallery-manifest.js
79+
└── package.json
80+
```
81+
82+
## Scripts
83+
84+
- `npm run dev` - Start development server
85+
- `npm run build` - Build for production
86+
- `npm run start` - Start production server
87+
- `npm run lint` - Run ESLint
88+
- `npm run build-manifest` - Generate gallery manifest from images
89+
90+
## Adding Images
91+
92+
1. Add your images to the `public/images/` directory, organized by category:
93+
```
94+
public/images/
95+
├── eco/
96+
├── fsc/
97+
├── hcc/
98+
├── sochum/
99+
└── unsc/
100+
```
101+
102+
2. Run the manifest generation script:
103+
```bash
104+
npm run build-manifest
105+
```
106+
107+
3. The gallery will automatically detect and display new images
108+
109+
## Tech Stack
110+
111+
- **Framework**: [Next.js 16](https://nextjs.org/) - React framework with App Router
112+
- **UI Library**: [React 19](https://react.dev/) - Latest React version
113+
- **Language**: [TypeScript](https://www.typescriptlang.org/) - Type-safe JavaScript
114+
- **Styling**: [Tailwind CSS 4](https://tailwindcss.com/) - Utility-first CSS
115+
- **Components**:
116+
- [Radix UI](https://www.radix-ui.com/) - Headless UI components
117+
- [Lucide React](https://lucide.dev/) - Icon library
118+
- **Image Processing**: [image-size](https://www.npmjs.com/package/image-size) - Get image dimensions
119+
- **Archive**: [yazl](https://www.npmjs.com/package/yazl) - ZIP file creation
120+
121+
## Key Features Explained
122+
123+
### Gallery Manifest
124+
125+
The `gallery-manifest.json` file is automatically generated from your images' folder.
126+
It contains metadata about all images including:
127+
128+
- File paths and URLs
129+
- Folder organization
130+
- Image dimensions
131+
- Optimized loading structure
132+
133+
### Download System
134+
135+
Users can:
136+
137+
1. Select multiple images using checkboxes
138+
2. Filter selection by category
139+
3. Download selected images as a ZIP file via the `/api/download` endpoint
140+
141+
### Responsive Design
142+
143+
The gallery adapts to different screen sizes:
144+
145+
- Mobile: Single column layout
146+
- Tablet: 2-3 column grid
147+
- Desktop: 4+ column masonry-style grid
148+
149+
## Configuration
150+
151+
### Tailwind Configuration
152+
153+
Tailwind is configured in `tailwind.config.cjs` with custom plugins and animations.
154+
155+
### Next.js Configuration
156+
157+
Next.js settings can be modified in `next.config.mjs`.
158+
159+
## Contributing
160+
161+
This is a project for WESMUN. If you need to contribute:
162+
163+
1. Create a feature branch
164+
2. Make your changes
165+
3. Test thoroughly
166+
4. Submit a pull request
167+
168+
## Support
169+
170+
For issues or questions, please contact the WESMUN technical team.
171+
172+
---
173+
174+
**Built with ❤️ for WESMUN**

0 commit comments

Comments
 (0)