|
11 | 11 | [](https://threejs.org/) |
12 | 12 | [](https://vitejs.dev/) |
13 | 13 | [](https://tailwindcss.com/) |
| 14 | +[](https://www.docker.com/) |
14 | 15 |
|
15 | 16 | [](https://bb84-simulation.vercel.app/) |
16 | 17 | [](https://github.com/PRODHOSH/bb84_simulation/stargazers) |
|
20 | 21 |
|
21 | 22 | --- |
22 | 23 |
|
23 | | -## � Overview |
| 24 | +## 🎬 Demo & Screenshots |
| 25 | + |
| 26 | +<div align="center"> |
| 27 | + |
| 28 | +### 🌟 3D Quantum Simulation in Action |
| 29 | + |
| 30 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/simulation-demo.gif" alt="3D Simulation Demo" width="80%"/> |
| 31 | + |
| 32 | +*Real-time photon transmission with polarization states* |
| 33 | + |
| 34 | +</div> |
| 35 | + |
| 36 | +<table> |
| 37 | +<tr> |
| 38 | +<td width="50%"> |
| 39 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/home-page.png" alt="Home Page"/> |
| 40 | +<p align="center"><b>Home Page</b> - Quantum-themed landing</p> |
| 41 | +</td> |
| 42 | +<td width="50%"> |
| 43 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/simulation-page.png" alt="Simulation Page"/> |
| 44 | +<p align="center"><b>3D Simulation</b> - Interactive photon visualization</p> |
| 45 | +</td> |
| 46 | +</tr> |
| 47 | +<tr> |
| 48 | +<td width="50%"> |
| 49 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/theory-page.png" alt="Theory Page"/> |
| 50 | +<p align="center"><b>Theory</b> - Educational content</p> |
| 51 | +</td> |
| 52 | +<td width="50%"> |
| 53 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/analytics-dashboard.png" alt="Analytics Dashboard"/> |
| 54 | +<p align="center"><b>Analytics</b> - Real-time charts & metrics</p> |
| 55 | +</td> |
| 56 | +</tr> |
| 57 | +</table> |
| 58 | + |
| 59 | +<div align="center"> |
| 60 | + |
| 61 | +### 🔬 Photon Polarization States |
| 62 | + |
| 63 | +<img src="https://raw.githubusercontent.com/PRODHOSH/bb84_simulation/main/public/images/demo/polarization-states.png" alt="Polarization States" width="60%"/> |
| 64 | + |
| 65 | +*Four quantum polarization states: Vertical, Horizontal, Diagonal, Anti-diagonal* |
| 66 | + |
| 67 | +</div> |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## 🔭 Overview |
24 | 72 |
|
25 | 73 | > **Experience quantum cryptography like never before** - Watch individual photons travel through space in real-time 3D as they establish an unbreakable secret key! |
26 | 74 |
|
@@ -158,6 +206,78 @@ npm run preview |
158 | 206 |
|
159 | 207 | --- |
160 | 208 |
|
| 209 | +## 🐳 Docker Deployment |
| 210 | + |
| 211 | +### Quick Start with Docker |
| 212 | + |
| 213 | +```bash |
| 214 | +# Build the Docker image |
| 215 | +docker build -t bb84-simulation . |
| 216 | + |
| 217 | +# Run the container |
| 218 | +docker run -p 3000:80 bb84-simulation |
| 219 | + |
| 220 | +# Access at http://localhost:3000 |
| 221 | +``` |
| 222 | + |
| 223 | +### Docker Compose (Optional) |
| 224 | + |
| 225 | +Create a `docker-compose.yml`: |
| 226 | + |
| 227 | +```yaml |
| 228 | +version: '3.8' |
| 229 | +services: |
| 230 | + bb84-simulator: |
| 231 | + build: . |
| 232 | + ports: |
| 233 | + - "3000:80" |
| 234 | + restart: unless-stopped |
| 235 | +``` |
| 236 | +
|
| 237 | +Then run: |
| 238 | +
|
| 239 | +```bash |
| 240 | +docker-compose up -d |
| 241 | +``` |
| 242 | + |
| 243 | +### Docker Architecture |
| 244 | + |
| 245 | +``` |
| 246 | +┌─────────────────────────────────────────────────────────┐ |
| 247 | +│ Docker Container │ |
| 248 | +├─────────────────────────────────────────────────────────┤ |
| 249 | +│ ┌─────────────────────────────────────────────────┐ │ |
| 250 | +│ │ Nginx (Alpine) │ │ |
| 251 | +│ │ - Serves static files from /dist │ │ |
| 252 | +│ │ - Gzip compression enabled │ │ |
| 253 | +│ │ - SPA routing (fallback to index.html) │ │ |
| 254 | +│ │ - Asset caching (1 year for /assets/) │ │ |
| 255 | +│ │ - Security headers configured │ │ |
| 256 | +│ └─────────────────────────────────────────────────┘ │ |
| 257 | +│ │ │ |
| 258 | +│ ▼ │ |
| 259 | +│ ┌─────────────────────────────────────────────────┐ │ |
| 260 | +│ │ Built React App (/dist) │ │ |
| 261 | +│ │ - Optimized production bundle │ │ |
| 262 | +│ │ - Code-split chunks (react, three, ui) │ │ |
| 263 | +│ │ - Minified JS/CSS │ │ |
| 264 | +│ └─────────────────────────────────────────────────┘ │ |
| 265 | +│ │ |
| 266 | +│ Port 80 ──────────────────────────────► Host Port 3000 │ |
| 267 | +└─────────────────────────────────────────────────────────┘ |
| 268 | +``` |
| 269 | + |
| 270 | +### Multi-Stage Build Process |
| 271 | + |
| 272 | +| Stage | Base Image | Purpose | |
| 273 | +|-------|------------|---------| |
| 274 | +| **Builder** | `node:20-alpine` | Install deps, build app | |
| 275 | +| **Production** | `nginx:alpine` | Serve static files | |
| 276 | + |
| 277 | +**Final Image Size**: ~50MB (optimized Alpine images) |
| 278 | + |
| 279 | +--- |
| 280 | + |
161 | 281 | ## 🎯 How to Use |
162 | 282 |
|
163 | 283 | <div align="center"> |
@@ -241,16 +361,22 @@ graph TB |
241 | 361 |  |
242 | 362 |  |
243 | 363 |  |
| 364 | + |
| 365 | + |
| 366 | + |
244 | 367 |
|
245 | 368 | </div> |
246 | 369 |
|
247 | | -**Frontend Framework**: React 18 with TypeScript |
248 | | -**3D Graphics**: Three.js + React Three Fiber |
249 | | -**Build Tool**: Vite 5 |
250 | | -**Styling**: Tailwind CSS + Shadcn/ui components |
251 | | -**State Management**: React Context API |
252 | | -**Animations**: Framer Motion |
253 | | -**Routing**: React Router v6 |
| 370 | +| Category | Technologies | |
| 371 | +|----------|--------------| |
| 372 | +| **Frontend** | React 18, TypeScript 5, Vite 5 | |
| 373 | +| **3D Graphics** | Three.js, React Three Fiber, React Three Drei | |
| 374 | +| **Styling** | Tailwind CSS, Shadcn/ui, Radix UI | |
| 375 | +| **State** | React Context, TanStack Query | |
| 376 | +| **Backend** | Supabase (PostgreSQL, Auth) | |
| 377 | +| **Charts** | Recharts | |
| 378 | +| **Routing** | React Router v6 | |
| 379 | +| **Deployment** | Docker, Nginx, Vercel | |
254 | 380 |
|
255 | 381 | --- |
256 | 382 |
|
|
0 commit comments