How quentinjuarez/paint-emoji works
Project type and purpose
• It has no in-repo backend; instead, it communicates with external APIs (for auth, drawing persistence, user data) and third-party services (Google OAuth, Slack emoji lists).
File structure
Top-level areas:
• src/ – all Vue components, composables, plugins, stores, services, router, middleware, utils, assets, theme, types.
• src/services/api – thin HTTP wrappers to external REST endpoints (auth, drawing, user).
• src/stores – global state (Pinia).
• src/router – route definitions and navigation.
• src/plugins/services.ts – plugin that injects API client into Vue app.
• scripts/ – release bump & deploy scripts.
• config – Vite, PostCSS, Tailwind, ESLint, Prettier, Husky, Vercel.
Key insights from README
• Minimal README points to a public demo URL.
• Implicit architecture: front-end app deployed on Vercel, connecting to remote backend services.
Main components & relationships
a. Components to illustrate:
1. User’s Browser / Client
2. Front-end SPA
– Presentation Layer: Vue components (DrawCanvas, EmojiList, etc.)
– Router Layer: vue-router
– State Layer: Pinia stores
– Service Layer: API clients (services/api/*.ts)
– Utility Layer: composables, directives, utils, i18n
3. Build & Deployment Pipeline
– Vite (dev server & build)
– scripts/*.sh (version bump & Vercel deploy)
4. External Services
– Auth Provider (Google OAuth)
– PaintEmoji Backend API (auth, drawing, user endpoints)
– Slack Emoji API (data import)
b. Interactions & data flows:
• Browser → (Vue Router) → Components → (Pinia actions) → Services → HTTP → Backend API
• Components pull from Pinia state; Pinia invokes composables and services.
• On app init, plugins/services register HTTP client globally.
• Asset loading (patterns, emojis) from local src/assets and remote Slack API.
• Community save/browse → backend.
• OAuth login → redirects to Google → callback to frontend → exchange code via auth service.
c. Architectural patterns & principles:
• Layered architecture (presentation, state, service, data).
• Component-based modularity (Base vs. Feature components).
• Single-page application with client-side routing.
• Unidirectional data flow: components dispatch store actions → services → update store → components react.
• Plugin injection for cross-cutting concerns (API client, i18n).
d. Technologies & frameworks:
• Vue 3 + Composition API
• Pinia for state management
• Vue Router
• Vite for bundling & dev server
• TypeScript
• PostCSS & Tailwind CSS
• Husky + ESLint + Prettier for quality
• Vercel for hosting
Don’t overthink—capture essential modules
• You don’t need individual every‐file nodes; cluster by feature folder.
• You call out the four major layers, the external boundaries (OAuth, backend), and the build/deploy step.