How zeroappz/dotzza-dev works
Project type and purpose
• This is a full-stack dashboard application built with Next.js.
• It provides both client and admin interfaces, handling authentication, content management, project/task management, chat, file management and data visualization.
File structure
• Top-level directories:
• pages (Next.js pages and API routes)
• components (UI building blocks)
• layouts (layout wrappers for pages)
• context/hooks/store (state management)
• utils/service/socket (network layer)
• public/static (assets)
• API routes under pages/api implement the backend logic.
• Jenkinsfile and bg_deployment.groovy indicate a CI/CD pipeline.
• next.config.js, tsconfig.json/jsconfig.json, tailwind.config.js show the build and styling configuration.
Extract architectural insights from the README
• Uses Next.js routing (no React Router).
• Provides server-side rendering (SSR) and static file serving.
• Version history shows dependency updates and layout refactor.
Main components and their interactions
a. Frontend Layer (Client‐side browser)
• Next.js pages + React components + Emotion/Tailwind CSS
• State management: Redux store (slices under src/store) and React Contexts for auth, user details, modals, notifications
• Hooks abstract data fetching and local storage
b. Server/API Layer (Next.js backend)
• pages/api/* endpoints handle authentication, CRUD for tasks/projects/teamspaces, chat, file uploads, visualizations
• service.js and src/utils/axios.js encapsulate HTTP logic for external APIs or microservices
• socket.js for real-time chat (WebSocket or Socket.io)
c. Data Persistence & External Services
• A database (Postgres, MongoDB or Firebase—file in public suggests possible Firebase admin SDK)
• External auth provider or JWT token handling (JWTAuth context, refresh/OTP endpoints)
• File storage (cloud storage, S3 or Firebase Storage) for uploads
• CI/CD (Jenkins) and infrastructure orchestration (bg_deployment.groovy)
d. Static Assets
Architectural patterns and design principles
• Container/Presentation: Pages act as containers calling services/hooks; components are purely presentational.
• Hooks/Context for cross-cutting concerns (authentication, theming, modal/snackbar state).
• API routes follow REST conventions, organized by feature (authentication, projectmanagement, view, visualization).
• Redux slices manage application-wide state (tasks, comments, user, teamspace).