This project is built on the T3 Stack and is bootstrapped with create-t3-app
. It integrates multiple cutting-edge technologies including Drizzle ORM for database interactions, Next.js for server-side rendering, NextAuth for authentication, and much more. This setup is designed to be scalable and efficient, making it suitable for both development and production environments.
- Next.js - The React framework for production.
- NextAuth.js - For secure authentication.
- Drizzle ORM - An ORM for managing database entities.
- Tailwind CSS - For utility-first CSS.
- tRPC - End-to-end typesafe APIs made easy.
- Ansible - For automating deployment and configuration.
- SonarQube - For continuous inspection of code quality.
- PostgreSQL - As the underlying database system.
-
Clone the repository:
git clone https://github.com/Youngermaster/T3-Stack-Shadcn-UI.git cd T3-Stack-Shadcn-UI
-
Install dependencies:
pnpm install
-
Setup the environment: Copy the
.env.example
file to.env
and update the environment variables to match your setup:cp .env.example .env
-
Start the local development database:
./start-database.sh
-
Run the development server:
pnpm dev
Visit
http://localhost:3000
to view the application.
-
Migrate and push changes to the database:
pnpm db:push
-
Open Drizzle Studio to manage the database interactively:
pnpm db:studio
Before starting your development server or deploying the application, ensure that your environment variables are set up correctly. The .env
file holds crucial configurations that influence the behavior of your application, including database connections and authentication mechanisms.
-
Set Up Environment Variables:
-
Copy the
.env.example
file to a new file named.env
in the root directory:cp .env.example .env
-
Modify the
.env
file to include your specific settings. This file should never be committed to your version control system as it contains sensitive information.
-
-
Configure Discord Authentication:
-
You will need to set up a Discord application to use Discord as an authentication provider. Visit the Discord Developer Portal, create a new application, and configure OAuth2.
-
Add the following URLs to your OAuth2 redirect URIs in the Discord Developer Portal:
http://localhost:3000/api/auth/callback/discord
Replace
localhost:3000
with your production domain if deploying to a live server. -
Obtain the
Client ID
andClient Secret
from your Discord application and set them in your.env
file:DISCORD_CLIENT_ID=your_client_id_here DISCORD_CLIENT_SECRET=your_client_secret_here
-
-
Verify Authentication Configuration:
-
Ensure
NEXTAUTH_URL
is set to the base URL of your site. For local development, this will typically be:NEXTAUTH_URL=http://localhost:3000
-
For detailed instructions on setting up your project and additional configurations, refer to the T3 documentation. This documentation provides a comprehensive guide on first steps, including further customization and enhancement of your application.
Run SonarQube analysis to ensure high code quality:
./sonar_scanner.sh
Ensure SonarQube is running locally or adjust SONARQUBE_URL
in your .env
to point to your SonarQube server.
The application can be deployed using Docker. See the docker-compose.yml
file for Docker configuration details. Use the following command to build and run the Docker environment:
docker-compose up --build
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache License. See LICENSE
for more information.
If you have any questions or need help, please open an issue.
Thank you for choosing this T3 Stack implementation for your next project!