This is a Next.js application with TypeScript, Tailwind CSS, and Next-Auth integration for authentication.
- Project Overview
- Getting Started
- Environment Setup
- Directory Structure
- Features
- Contributing
- License
This project is a Next.js application that includes TypeScript for type safety, Tailwind CSS for styling, and Next-Auth for authentication. It's designed to provide a robust foundation for building modern web applications with user authentication capabilities.
The application includes the following key features:
- TypeScript: For static typing and better code quality.
- Tailwind CSS: For utility-first styling and responsive design.
- Next-Auth: For handling user authentication, including sign-in, sign-up, and session management.
- Custom Components: Reusable UI components for consistent styling across the application.
- Utilities: Helper functions to simplify common tasks.
To get started with this project, follow these steps:
- Node.js (v14 or higher)
- npm (v6 or higher)
- A modern web browser
- Basic understanding of Next.js, TypeScript, and Tailwind CSS
-
Clone the repository:
git clone https://github.com/Shivoo29/Zennith cd Zennith
-
Install dependencies:
npm install --legacy-peer-deps
-
Set up environment variables:
- Copy
.env.example
to.env
. - Update the values in
.env
as needed.
- Copy
-
Start the development server:
npm run dev
The application should be available at
http://localhost:3000
.
The project uses environment variables for configuration. The required environment variables are defined in
types/environment.d.ts
and include:
NEXTAUTH_URL
: URL of your Next.js application.NEXTAUTH_SECRET
: Secret used by NextAuth to sign tokens.ADMIN_EMAIL
: Email address for the admin user.ADMIN_PASSWORD
: Password for the admin user.
Create a .env
file in the root directory with these variables before starting the development server.
src/
├── components/ # Reusable UI components
│ ├── auth/ # Authentication-related components
│ ├── layout/ # Layout and page structure components
│ └── utils/ # Utility components
├── pages/ # Next.js pages (e.g., home, login)
├── styles/ # Custom Tailwind CSS configurations
├── types/ # TypeScript type definitions
└── utils/ # Helper functions and utilities
The application uses Next-Auth for authentication. The following features are implemented:
- User registration and login.
- Session management.
- Role-based access control (RBAC).
The project uses Tailwind CSS for styling, with custom configurations in styles/tailwind.config.js
. The
design system includes:
- Responsive design.
- Custom utility classes.
- Consistent spacing and typography.
Reusable UI components are located in the components
directory. These include:
- Auth-related components (e.g., LoginForm, RegisterForm).
- Layout components (e.g., Navigation, Footer).
- Utility components for common tasks.
Contributions are welcome! To contribute to this project:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-branch
). - Commit your changes (
git commit -m "Add your-commit"
). - Push to the branch (
git push origin feature/your-branch
). - Open a Pull Request.
Please ensure that your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License. See LICENSE
for more information.
The components
directory contains reusable UI elements:
- Auth Components: Located in
components/auth/
, these include login, registration, and password reset forms. - Layout Components: Found in
components/layout/
, these define the overall structure of your pages (e.g., headers, footers). - Utility Components: Helper components in
components/utils/
for tasks like modals or alerts.
The pages
directory contains Next.js route files. These include:
- Home page (
pages/index.tsx
). - Authentication pages (
pages/auth/[login|register].tsx
). - Other application-specific routes.
Custom Tailwind CSS configurations are located in styles/tailwind.config.js
. This file includes custom
plugins, theme extensions, and other styling-related configurations.
Type definitions for the project are located in the types
directory. These include:
- Custom Next-Auth types (e.g., user sessions, providers).
- Environment variable type definitions.
- Other application-specific TypeScript interfaces and types.
Helper functions and utilities are located in the utils
directory. These may include:
- Authentication-related functions.
- Data validation functions.
- Helper functions for common tasks (e.g., date formatting).
[Insert project status, e.g., "Active development", "In Beta", or "Stable"].
If you have any questions or need further assistance, feel free to reach out!