How nahankar/shatika works
Project Type and Purpose
• This is a full-stack e-commerce application (“Shatika”) for traditional Indian art and crafts.
• Frontend: React + TypeScript (with Redux, Vite, components/pages)
• Backend: Node.js + Express (TypeScript, MVC-style controllers/models/routes)
• Database: MongoDB (with Mongoose)
• Media storage: Cloudinary
• Deployment: Docker Compose (with nginx reverse proxy), GitHub Actions for Docker image publishing.
File Structure Analysis
• Top-level:
• client/ – React application (src/, components, pages, redux store, Vite config, Dockerfile, nginx.conf)
• server/ – Express API (src/app.ts, controllers/, models/, routes/, middleware/, utils/, scripts/, Dockerfile)
• docker-compose.yml – orchestrates client, server, MongoDB services
• nginx.conf – reverse proxy configuration
• .github/workflows/docker-publish.yml – CI pipeline
• Patterns: MVC on the server, component/page and container splits on the client, Redux for state, Vite as bundler, Docker Compose network.
README Insights
• Features: authentication, product catalog, cart, orders, admin dashboard
• Tech stack confirms MERN-like architecture
a. Main Components
• User’s browser (UI layer)
• React App (Vite bundle)
• nginx (reverse proxy, static file hosting)
• Express API server (controllers, business logic)
• MongoDB database
• Cloudinary (image/media storage)
• GitHub Actions (CI/CD)
b. Relationships and Interactions
1. Browser ‹—HTTPS—› nginx serves React assets or proxies API calls
2. nginx › HTTP › Express API
3. Express › Mongoose driver › MongoDB
4. Express › Cloudinary SDK › Cloudinary
5. CI/CD › Docker registry › Deploy updated Docker images
c. Architectural Patterns
• Frontend: Component-based with Redux for global state
• Backend: MVC style (routes → controllers → models)
• Infrastructure: Containerized services orchestrated by Docker Compose, reverse proxy for routing and SSL termination
d. Key Technologies
• React, TypeScript, Redux, Vite
• Node.js, Express, TypeScript, Mongoose
• Docker, Docker Compose, nginx
• MongoDB, Cloudinary
• GitHub Actions