This commit is contained in:
Alexandru Eduard Farcas
2025-12-05 10:19:08 +02:00
2 changed files with 67 additions and 40 deletions
+67 -38
View File
@@ -17,68 +17,97 @@ A modern web application for hosting and managing giveaways, built with [Next.js
## Getting Started
1. **Install dependencies:**
### Prerequisites
Ensure you have the following installed:
- [Node.js](https://nodejs.org/) (v16 or later)
- [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
- [PostgreSQL](https://www.postgresql.org/)
### Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/giveaway-app.git
cd giveaway-app
```
2. Install dependencies:
```bash
npm install
# or
yarn install
# or
pnpm install
# or
bun install
```
2. **Run the development server:**
3. Set up environment variables:
Create a `.env` file in the root directory and add the following:
```env
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:
```bash
npx prisma migrate dev
```
5. Run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
3. Open [http://localhost:3000](http://localhost:3000) in your browser.
6. Open [http://localhost:3000](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.
- `styles/` — Global and Tailwind CSS styles.
- `public/` — Static assets.
- `next.config.js` — Next.js configuration.
- `tsconfig.json` — TypeScript configuration.
- `lib/` — Utility libraries (e.g., database client).
- `prisma/` — Prisma schema and migrations.
- `.env` — Environment variables for API keys and database connection.
- `public/` — Static assets (e.g., images, icons).
## Technologies Used
## Key Scripts
- **Next.js** — React framework for production.
- **TypeScript** — Static typing for JavaScript.
- **Tailwind CSS** — Utility-first CSS framework.
- **next/font** — Font optimization.
- **Google Authentication** — Secure OAuth 2.0 login.
- **YouTube API** — Integration for YouTube data.
- **PostgreSQL** — Relational database.
- **Prisma** — Type-safe ORM for database access.
- **Railway** — Cloud database hosting.
- **Vercel** — Deployment platform.
- `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
Deploy instantly to [Vercel](https://vercel.com/) for best performance and global reach.
This project is ready for deployment on [Vercel](https://vercel.com/):
## Learn More
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.
- [Next.js Documentation](https://nextjs.org/docs)
- [TypeScript Docs](https://www.typescriptlang.org/docs/)
- [Tailwind CSS Docs](https://tailwindcss.com/docs)
- [Prisma Documentation](https://www.prisma.io/docs)
- [Railway Documentation](https://docs.railway.app/)
- [Google Identity Platform](https://developers.google.com/identity)
- [YouTube Data API Docs](https://developers.google.com/youtube/v3)
## Contributing
---
Contributions are welcome! Please follow these steps:
Feel free to contribute or open issues to improve the project!
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](LICENSE) file for details.
## Acknowledgments
- [Next.js](https://nextjs.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Prisma](https://www.prisma.io/)
- [Vercel](https://vercel.com/)
-2
View File
@@ -1,2 +0,0 @@
###
GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId=48oDy9Ni1TA&key=AIzaSyB92CRC8QVrUUXBRuW9lt6vGJUbAsSOMts