How creativetimofficial/notus-nextjs works
Main Components
• NextJS Framework Core – at the heart of the application, providing routing, server-side rendering, and page management.
• Presentation Layer – this includes the public and landing pages (such as index.js, landing.js, profile.js, and 404/_error pages) that form the website’s front-facing interface.
• Admin Dashboard – under the “pages/admin” directory, there are dashboard, maps, settings, and tables pages. Also note that there’s a dedicated "layouts/Admin.js" file for admin-specific structure.
• Authentication Module – under the “pages/auth” directory for login and register pages, plus an “layouts/Auth.js” file that provides layout for these pages.
• Reusable Components – a major folder, “components”, provides granular UI elements such as Cards (various card components), Dropdowns, Navbars (Admin, Auth, and Index), Footers, Headers, Sidebar, Maps, and PageChange. These pre-built UI pieces are used throughout the application to maintain consistency.
• Static Assets and Styling – the “public” directory holds images (branding assets), while “styles” and Tailwind configuration files (tailwind.config.js) manage the styling strategies.
Out the Relationships and Interactions
• At the core, each “page” (whether admin, auth, landing, or error pages) imports the relevant layout (Admin.js, Auth.js, or a default layout) which then composes the various UI components.
• The reusable UI components (cards, dropdowns, etc.) are integrated within the page structures to render specific content and perform dynamic behavior.
• The NextJS routing mechanism (via “pages” directory) automatically creates routes that map to these UI components and layouts.
• The Tailwind CSS system defines the styling and theming across all components, ensuring consistency through globally imported styles.
Architectural Patterns
• Component-Based Design: The project uses a modular approach, separating concerns into reusable components.
• Layout Abstraction: Distinct layout components for admin and auth allow for base templates tailored for different types of pages.
• Convention-over-Configuration: The NextJS file structure is used to automatically generate routing, reflecting a clear MVC-like separation (pages as views and components as view elements).
• Styling via Tailwind CSS: A utility-first CSS framework that streamlines design while allowing dynamic class management and reusability.
Relevant Technologies and Frameworks
• NextJS (for server-side rendering, routing, and overall React framework enhancements)
• React (as Notus NextJS is built on React components)
• Tailwind CSS (for styling and design consistency)
• Possibly additional client-side libraries (e.g., for charting within card components, although not explicitly called out, they’re likely integrated in components like CardBarChart and CardLineChart).