README update

This commit is contained in:
EdiFarcas
2025-07-18 11:32:04 +03:00
parent fb6489bbec
commit ebbe5d55bf
+67 -38
View File
@@ -17,68 +17,97 @@ A modern web application for hosting and managing giveaways, built with [Next.js
## Getting Started ## 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 ```bash
npm install npm install
# or # or
yarn install 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 ```bash
npm run dev npm run dev
# or # or
yarn dev 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 ## Project Structure
- `app/` — Main application pages and routes. - `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. - `components/` — Reusable UI components.
- `styles/` — Global and Tailwind CSS styles. - `lib/` — Utility libraries (e.g., database client).
- `public/` — Static assets.
- `next.config.js` — Next.js configuration.
- `tsconfig.json` — TypeScript configuration.
- `prisma/` — Prisma schema and migrations. - `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. - `npm run dev` — Start the development server.
- **TypeScript** — Static typing for JavaScript. - `npm run build` — Build the application for production.
- **Tailwind CSS** — Utility-first CSS framework. - `npm start` — Start the production server.
- **next/font** — Font optimization. - `npx prisma studio` — Open Prisma Studio to manage the database.
- **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.
## Deployment ## 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) ## Contributing
- [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)
--- 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/)