Casino (Gwydion)

6. Frontend (NextJS 13)

The frontend of the casino software is developed using NextJS 13, a React framework that excels in server-side rendering and provides a powerful App Router. This section outlines key aspects of the frontend architecture.

6.1 NextJS 13 App Router

The frontend utilizes the NextJS 13 App Router, taking advantage of its server-side rendering capabilities to enhance performance and SEO. The App Router efficiently manages page navigation and ensures a seamless user experience.

6.2 Component Structure

All frontend components are organized within the components directory. This directory structure fosters a modular approach, making it easier to manage and scale the frontend application. Each component encapsulates specific functionalities and can be reused across different pages.

6.3 Styling with Tailwind CSS

Styling for the frontend is accomplished using Tailwind CSS, a utility-first CSS framework. Tailwind CSS provides a flexible and efficient way to design responsive and visually appealing user interfaces. The styling is organized to align with Tailwind CSS conventions.

6.4 Theming

The frontend is designed to support theming, allowing for a customizable and branded user experience. Theming configurations can be adjusted to match the visual identity of different brands. The theming functionality provides flexibility for rebranding and hosting on different domains.

6.5 Authentication with NextAuth/Auth.js

User authentication is handled through NextAuth.js and Auth.js, offering a secure and streamlined authentication process. The integration provides a variety of authentication providers, ensuring a smooth login experience for users. Authentication requests, including login operations, are performed both on the server and client sides.

6.6 Server-Side Rendering

For optimal performance, many requests are made on the server during page rendering. This server-side rendering approach enhances speed and efficiency, providing users with a responsive and dynamic experience. It also allows for a faster initial page load and better search engine optimization.

6.7 Services Directory

Requests made from the user's client, such as login operations, are encapsulated within services. These services, located in the services directory, modularize client-side interactions with the backend API. This structure promotes maintainability and separation of concerns.


The frontend architecture is designed to deliver a responsive, themable, and secure user interface. Developers can explore the components, services, and other directories to gain insights into the frontend structure and leverage the power of NextJS and related technologies.

Previous
Backend