Skip to content

Google Developer Groups on Campus Chapter Universitas Negeri Malang Website Refactored

License

CC-BY-SA-4.0, MIT licenses found

Licenses found

CC-BY-SA-4.0
LICENSE
MIT
LICENSE-CODE
Notifications You must be signed in to change notification settings

gdsc-um/homesite-refactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Homesite Refactor 2025

๐Ÿš€ Homesite Refactor is a full-stack web application for GDGoC UM, designed to provide an improved, feature-rich, and scalable platform.

๐Ÿ›  Features

  • Upgraded to Next.js 15 with TypeScript.
  • Backend integration using Prisma ORM.
  • User authentication with next-auth.
  • Admin panel for managing users and data.
  • Responsive UI with modern design.

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js v20+ (LTS recommended)
  • pnpm (Preferred package manager)
  • MySQL (or any database supported by Prisma)

๐Ÿš€ Getting Started

1. Clone the Repository

git clone https://github.com/gdsc-um/homesite-refactor.git
cd homesite-refactor

2. Install Dependencies

Using pnpm for package management:

pnpm install

3. Set Up the Backend

Create Database

  1. Access your MySQL instance using a client (e.g., MySQL Workbench, phpMyAdmin, or the command line).

  2. Run the following SQL command to create a database:

CREATE DATABASE homesite_refactor;  

Replace homesite_refactor with your preferred database name.

  1. Create a database user and grant privileges (optional):
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';  
GRANT ALL PRIVILEGES ON homesite_refactor.* TO 'username'@'localhost';  
FLUSH PRIVILEGES;  

Replace username and password with your desired credentials.

Configure Environment Variables

Create a .env file in the root directory and add the following configuration:

DATABASE_URL="mysql://username:password@host:port/database"
NEXTAUTH_SECRET="your-secret-key"
NEXT_PUBLIC_API_BASE_URL="http://example.com"
NEXT_PUBLIC_QUIZ_SECRET="your-secret-key"

Replace placeholders with your database credentials and NextAuth settings.

Initialize Prisma

  1. Generate the Prisma client:

    pnpm prisma generate
  2. Run database migrations:

    pnpm prisma migrate dev

    This command applies schema changes and updates the database.

  3. (Optional) Seed the database: Check prisma/seed.ts file for seeding the database, then run:

    pnpm prisma db seed

4. Run the Application

Start the development server:

pnpm next dev

Visit the app at http://localhost:3000.

๐Ÿ›  Development Tools

Scripts

Command Description
pnpm next dev Start the development server
pnpm next build Build the project for production
pnpm nextstart Start the production server
pnpm prisma generate Generate Prisma client
pnpm prisma migrate dev Apply migrations in development
pnpm prisma migrate dev --name migration-name Updateย Prisma schema in schema.prisma.

Libraries & Tools

  • Framework : Next.js
  • Database : Prisma ORM, MySQL
  • Styling : Tailwind CSS, Shadcn UI
  • Authentication : next-auth
  • TypeScript : Strict typing for maintainability

๐Ÿค Contribution Guide

  • Fork the repository.
  • Create a feature branch (git checkout -b feature-branch-name).
  • Commit your changes (git commit -m 'Add some feature').
  • Push to the branch (git push origin feature-branch-name).
  • Open a pull request.

Commit Messages

Use Conventional Commits :

  • feat: A new feature (e.g., feat: add admin dashboard).
  • fix: A bug fix (e.g., fix: correct user role validation).
  • chore: Changes to build or dependencies (e.g., chore: update Tailwind CSS).
  • docs: Documentation updates (e.g., docs: update README for setup).
  • refactor: Code refactoring (e.g., refactor: optimize middleware logic).
  • test: Adding or updating tests (e.g., test: add tests for middleware).

๐Ÿ“œ License

This project is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

About

Google Developer Groups on Campus Chapter Universitas Negeri Malang Website Refactored

Resources

License

CC-BY-SA-4.0, MIT licenses found

Licenses found

CC-BY-SA-4.0
LICENSE
MIT
LICENSE-CODE

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published