Welcome to Digifest 2024! This web application is designed to manage and display information for competitions, built using the latest technologies to ensure high performance and a great user experience.
- Next.js 14: The cutting-edge framework for fast, server-rendered React applications.
- Prisma: An ORM for interacting with the MySQL database, enabling easy data access and management.
- MySQL: A robust relational database to store competition information.
- NextAuth.js: Provides secure user authentication with built-in support for OAuth and JWT.
- Frontend: Next.js 14, React
- Backend: Next.js Server Actions, Prisma ORM
- Database: MySQL
- Authentication: NextAuth.js
-
Clone the repository:
git clone https://github.com/mokletdev/digifest-2024.git cd digifest-2024
-
Install the dependencies:
npm install
-
Setup the environment variables. Create a
.env
file in the root of the project and add the following:DATABASE_URL="mysql://username:password@localhost:3306/dbname" NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key" ......
-
Set up the Prisma schema and push it to the database:
npm run prisma:push
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to view the app.
npm run dev
: Runs the app in development mode.npm run build
: Builds the app for production.npm run start
: Starts the production server.npm run prisma:studio
: Opens Prisma Studio for viewing and editing your database in a browser.npm run prisma:migrate
: It's an alias fornpx prisma migrate dev
, but using the .env.local env file.npm run prisma:push
: It's an alias fornpx prisma push
, but using the .env.local env file.
.
├── prisma/ # Prisma schema and migrations
├── public/ # Static assets (images, etc.)
├── src/
│ ├── app/ # Next.js pages and main folder(includes API routes)
│ ├── utils/ # Utilities
│ ├── lib/ # Helper libraries
| ├── database/ # Database interaction (queries)
| ├── types/ # Types for TypeScript usages
| ├── middleware.ts # Middleware
├── .env # Environment variables
├── next.config.js # Next.js configuration
├── README.md # Project documentation
Digifest 2024 uses NextAuth.js to handle authentication, supporting various providers like Google, GitHub, and more. Ensure you configure the .env
file correctly with the required credentials.
Prisma is used to manage the MySQL database. The schema is defined in prisma/schema.prisma
, and you can generate database migrations using Prisma CLI commands. Use npm run prisma:studio
to interact with your database visually.
Feel free to open issues and submit pull requests. Make sure to follow the contribution guidelines provided in the CONTRIBUTING.md file.
This project is licensed under the MIT License. See the LICENSE file for details.
- Kusindra Aji Rabbany (Developer)
- Ahsan Awadullah Azizan (Developer)
- Baskara Putra (Developer)
- Moch. Gilang Ramadhan (UI/UX Designer)