How hiteshchoudhary/appwriteblog works
Project type and purpose
• This is a client-side Single Page Application (SPA) built with React and Vite.
• It uses Appwrite as a backend-as-a-service (BaaS) for authentication and data storage.
• Tailwind CSS/PostCSS provide styling; Redux (via @reduxjs/toolkit) manages client state.
File structure
• Top level
• index.html, package.json, vite.config.js, tailwind.config.js → build & tooling
• public/ → static assets
• src/
• src/main.jsx → bootstrap & render React app
• src/App.jsx / App.css → root component & global styles
• src/appwrite/ → Appwrite SDK config & auth wrapper
• src/store/ → Redux store & slices (authSlice)
• src/components/ → reusable UI components (buttons, inputs, layouts)
• src/pages/ → page-level views (Home, Login, Signup, Post CRUD)
• src/conf/ → application constants (API endpoints, feature flags)
Pulling in README insights
• Vite for fast dev & HMR
• ESLint rules defined in .eslintrc.cjs
• Two official React plugins available, but this template uses @vitejs/plugin-react
a. Main components
• Browser/Client
– Vite-built React SPA
– UI Layer (Pages & Components)
– State Layer (Redux store & slices)
– Service Layer (Appwrite SDK wrapper)
• Appwrite Backend
– Auth Service (sessions, JWT)
– Database Service (collections, documents)
– Storage Service (if used)
– Functions/Webhooks (optional)
• Static Hosting / CDN (e.g., Netlify, Vercel, AWS S3 + CloudFront)
b. Relationships & interactions
– User interacts with UI → React components dispatch Redux actions → Appwrite SDK calls (REST/SDK) → Appwrite services respond → Redux store updates → UI re-renders
– Vite dev server serves index.html and static assets; production bundle deployed to CDN
c. Architectural patterns & principles
– Component-based UI (separation of concerns)
– Unidirectional data flow (React + Redux)
– BaaS integration abstracted behind a service module (src/appwrite/*)
– Environment configuration injection via .env.sample and src/conf/conf.js
d. Key technologies/frameworks/libraries
– React + JSX
– Vite (build & dev server)
– Redux Toolkit (authSlice.js, store.js)
– Appwrite JavaScript SDK (auth.js, config.js)
– Tailwind CSS & PostCSS
– ESLint for code quality