2025-12-05 10:19:08 +02:00
FIX
2025-07-18 11:49:51 +03:00
2025-05-05 21:42:29 +03:00
2025-05-24 16:05:57 +03:00
2025-05-27 12:21:09 +03:00
2025-04-26 22:31:07 +03:00
2025-05-18 10:15:18 +03:00
2025-12-05 10:18:13 +02:00
2025-12-05 10:18:13 +02:00
2025-07-18 11:32:04 +03:00

Giveaway Site

A modern web application for hosting and managing giveaways, built with Next.js, TypeScript, and Tailwind CSS.

Features

  • Next.js App Router for fast, scalable routing and SSR/SSG.
  • 🛠️ TypeScript for type safety and better developer experience.
  • 🎨 Tailwind CSS for utility-first, responsive UI design.
  • 🗂️ App Directory Structure for modular, maintainable code.
  • 🔤 next/font for optimized font loading (Geist).
  • 🔒 Environment Variables for secure configuration.
  • 🔑 Google Authentication for secure user sign-in and account management.
  • 📺 YouTube API Integration to interact with YouTube data for giveaway requirements or validation.
  • 🗄️ PostgreSQL Database managed with Prisma ORM and hosted on Railway for scalable, reliable data storage.
  • 🚀 Ready for Vercel Deployment with zero-config.

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/giveaway-app.git
    cd giveaway-app
    
  2. Install dependencies:

    npm install
    # or
    yarn install
    
  3. Set up environment variables: Create a .env file in the root directory and add the following:

    DATABASE_URL=your_postgresql_connection_string
    GOOGLE_CLIENT_ID=your_google_client_id
    GOOGLE_CLIENT_SECRET=your_google_client_secret
    NEXTAUTH_SECRET=your_nextauth_secret
    GOOGLE_YOUTUBE_API_KEY=your_youtube_api_key
    
  4. Apply database migrations:

    npx prisma migrate dev
    
  5. Run the development server:

    npm run dev
    # or
    yarn dev
    
  6. Open http://localhost:3000 in your browser.

Project Structure

  • app/ — Main application pages and routes.
    • admin/ — Admin-specific pages and components for managing giveaways.
    • api/ — API routes for server-side logic.
    • giveaways/ — Public-facing pages for active giveaways.
    • profile/ — User profile pages.
  • components/ — Reusable UI components.
  • lib/ — Utility libraries (e.g., database client).
  • prisma/ — Prisma schema and migrations.
  • public/ — Static assets (e.g., images, icons).

Key Scripts

  • npm run dev — Start the development server.
  • npm run build — Build the application for production.
  • npm start — Start the production server.
  • npx prisma studio — Open Prisma Studio to manage the database.

Deployment

This project is ready for deployment on Vercel:

  1. Push your code to a GitHub repository.
  2. Connect the repository to Vercel.
  3. Add the required environment variables in the Vercel dashboard.
  4. Deploy the application.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature-name).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

S
Description
A React-based giveaway management app with features for creating, managing, and selecting winners for giveaways.
Readme 468 KiB
Languages
TypeScript 96.8%
JavaScript 2.2%
CSS 1%