πŸš€ Inside the Architecture of SnappShare: Building a Reliable File-Sharing System with Nuxt 3 & .NET

SnappShare isn’t just another file upload app β€” it’s a secure, chunked, resumable, and production-ready file-sharing platform. In this post, I’ll walk you through how I structured the architecture, the challenges I solved, and why I made certain decisions β€” from the Nuxt 3 frontend to the robust .NET API.


πŸ“Œ What is SnappShare?

SnappShare is a secure file-sharing system that supports:

  • πŸ”„ Resumable uploads (ideal for poor network conditions)

  • 🧱 Chunk-based file transfers with retry logic

  • πŸ” SAS-secured download links

  • πŸ“¦ Azure Blob Storage & Service Bus integration

  • πŸ“Š Access tracking, progress, and expiration handling

Live frontend: https://snappshare-web.vercel.app
GitHub: Frontend | Backend


πŸ–₯️ Frontend Architecture (Nuxt 3 + Pinia + IndexedDB)

🧠 Core Responsibilities

  • Chunked uploads with retry

  • Persistent resumable jobs via IndexedDB

  • File previews, status-based UI, and progress tracking

  • Offline resilience

  • State management with Pinia

πŸ—‚ Folder Structure

SnappShareWeb/
β”œβ”€β”€ components/        # UI components (buttons, skeletons, toasts)
β”œβ”€β”€ composables/       # Logic (upload runner, hash worker, toasts)
β”œβ”€β”€ layouts/           # Nuxt layouts (optional use)
β”œβ”€β”€ pages/             # Route-based views
β”œβ”€β”€ public/            # Static assets
β”œβ”€β”€ server/            # (Unused for now)
β”œβ”€β”€ stores/            # Pinia stores (e.g., file-uploads.ts)
β”œβ”€β”€ tests/             # Placeholder for tests
β”œβ”€β”€ types/             # Global types (e.g., UploadJob)
β”œβ”€β”€ workers/           # Web workers (e.g., hash.worker.ts)
β”œβ”€β”€ services/          # API abstraction layer
└── nuxt.config.ts     # Project config

🧩 Key Layers

πŸ”„ useUploadJobRunner.ts

Encapsulates:

  • Chunk slicing

  • Retry logic (3 attempts max)

  • Progress tracking

  • Upload finalization

🧠 file-uploads.ts Store

Handles upload state:

  • Start, resume, remove uploads

  • List reactive jobs

  • Status filtering & sorting

πŸ’Ύ IndexedDB Layer

  • Persists jobs locally

  • Resumes uploads by file hash

  • Uses idb-keyval for simplicity

βš™οΈ Workers

  • SHA hashing offloaded to hash.worker.ts

  • Improves performance before upload begins

πŸ–ΌοΈ UI Layer

  • Lottie animations + skeleton loaders

  • Custom components for progress, status, and feedback


🧰 Backend Architecture (.NET 8 + EF Core + Azure)

πŸ”§ Core Project Layers

api/
β”œβ”€β”€ Controllers/        # FileEntry endpoints
β”œβ”€β”€ DTOs/               # Input/output contracts
β”œβ”€β”€ Models/             # EF Core entities + Enums
β”œβ”€β”€ Services/           # Core logic
β”œβ”€β”€ Repositories/       # EF Core data layer
β”œβ”€β”€ Configs/            # Azure config bindings
β”œβ”€β”€ Middlewares/        # Global error handling
β”œβ”€β”€ Extensions/         # Service registration
└── Program.cs          # App bootstrap

🧠 Logic Breakdown

FeatureFlow
Create FileController β†’ Service β†’ Repo
Upload ChunkController β†’ Service β†’ Blob Storage
Finalize UploadCommit block blob, mark file complete, expose SAS URL
Retry/Lock CheckRe-evaluate lock expiration and resume incomplete uploads
Expiry HandlingComputed via model: UpdatedAt + ExpiryDuration

☁️ Azure Integrations

  • Blob Storage for chunked file uploads (Block Blobs)

  • Azure Service Bus to delay deletion messages (post-upload expiry)

  • App Service hosting for API

  • SAS tokens for secure, temporary file access

πŸ” CORS & Security

  • Whitelisted frontend origins only

  • Supports secure credentials via .AllowCredentials()

  • Global error handling via GlobalExceptionHandler for clean ProblemDetails responses


πŸ“ˆ Testing & Future-Proofing

βœ… Frontend Plans

  • Background upload queue (with concurrency control)

  • Drag-and-drop support

  • Pause/resume upload logic

  • Error logs per chunk

βœ… Backend Improvements

  • Unit & integration tests using mock interfaces

  • File lifecycle monitoring

  • WebSocket integration for real-time status updates


πŸ“¦ Why This Stack?

  • Nuxt 3: SSR-ready, modular, and built for Vue 3 with Vite speed.

  • Pinia: Modern, type-safe state management.

  • IndexedDB: Offline-friendly resumable uploads.

  • .NET + EF Core: Scalable and fast backend with built-in DI, validation, and clean layering.

  • Azure Services: Production-grade blob storage and message scheduling out of the box.


πŸ”— Explore the Code


✍️ Final Thoughts

SnappShare has been a personal dive into solving real-world file upload problems β€” poor connections, huge files, and secure access β€” with a clean, maintainable architecture.
It’s not just a side project β€” it’s a showcase of practical software engineering with real-world Azure integration and frontend resilience.

Have feedback? Try the live version or check out the code and open an issue. Let’s build better uploads β€” together.


πŸ“’ Let’s Connect

Follow my journey building tools like SnappShare, diving deep into .NET, Azure, and full-stack development:

0
Subscribe to my newsletter

Read articles from Freeman Madudili directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Freeman Madudili
Freeman Madudili

Hi, I’m Freeman, a Software Developer specializing in C#, .NET, and Azure. With a passion for creating seamless web and cloud solutions, I’ve built and deployed apps that solve real-world problems. Follow along as I share insights, projects, and tips from my journey in tech!