How watizat/webapp works
Project type and purpose
• This is a full-stack web application (monorepo-style) with a React-based FrontOffice (public guide) and a BackOffice (admin interface) that consumes a headless CMS.
• The app is built in TypeScript, styled with Tailwind CSS, bundled by Vite, and uses Redux for client-side state plus Leaflet for maps.
• The backend (“server side”) is entirely provided by Directus (a headless CMS) running in a Docker container and backed by PostgreSQL. There is also an external Navitia transport API integration.
File-structure analysis
• Top-level config: .eslintrc.cjs, .prettierrc.cjs, tailwind.config.js, vite.config.ts, tsconfig.json.
• public/ contains static assets (img, manifest.json, robots.txt).
• src/ splits into:
• @types/ – global TS type defs
• api/ – Axios wrappers for Directus endpoints (admin, CRUD), Navitia, organisms, user
• components/ – feature-driven React components, organized by BackOffice vs. FrontOffice, and further subdivided per page/section
• context/ & hooks/ – React Contexts and custom hooks for app state and BackOffice context
• utils/ – pure helper functions (axios instance, formatters, distance calculations, user roles)
• styles/ – global CSS, Tailwind reset, markdown styling
• main.tsx & router.tsx – React entrypoint and client-side router configuration
README insights
• Confirms the tech stack (React, Redux, TS, Vite, Tailwind, Leaflet)
• Backend: Directus + PostgreSQL in Docker
• Usage: dev server at localhost:5173, no custom server code in repo