-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
484fcf0
commit b019eab
Showing
1 changed file
with
196 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,216 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
# IIITV Coding Club Website | ||
|
||
Welcome to the new repository for the **IIITV Coding Club** website! This project is part of the **Contribut-a-thon**, and we are excited to have you contribute. This document will guide you through the project structure, setup, and contribution process. | ||
|
||
## Table of Contents | ||
|
||
- [Introduction](#introduction) | ||
- [Features](#features) | ||
- [Tech Stack](#tech-stack) | ||
- [Project Structure](#project-structure) | ||
- [Getting Started](#getting-started) | ||
- [Prerequisites](#prerequisites) | ||
- [Installation](#installation) | ||
- [Environment Variables](#environment-variables) | ||
- [Running the Project](#running-the-project) | ||
- [Contribution Guidelines](#contribution-guidelines) | ||
|
||
## Introduction | ||
|
||
This is the official website for the **IIITV Coding Club**, built with modern web technologies. The project is hosted on Vercel and aims to showcase club activities, blogs, events, and more. We encourage you to explore the project and contribute to its development! | ||
|
||
## Features | ||
|
||
- User authentication system (Sign up, login, reset password) | ||
- Blog publishing platform | ||
- Event management system | ||
- Responsive design | ||
- Integration with Supabase for backend services | ||
|
||
## Tech Stack | ||
|
||
- **Frontend:** Next.js, React | ||
- **Backend:** Supabase, REST APIs | ||
- **Styling:** Tailwind CSS | ||
- **Deployment:** Vercel | ||
- **Database:** Supabase (PostgreSQL) | ||
- **Auth:** Supabase Auth | ||
|
||
## Project Structure | ||
|
||
``` | ||
/iiitvcc | ||
├── .github # GitHub-specific configurations | ||
│ └── workflows # GitHub CI/CD Action workflows | ||
├── .gitignore # Specifies files and directories to be ignored by Git | ||
├── components.json # JSON file to define components or modules in the project | ||
├── next-env.d.ts # TypeScript environment definitions for Next.js | ||
├── next-sitemap.config.js # Configuration for generating sitemaps | ||
├── next.config.mjs # Next.js configuration file | ||
├── package-lock.json # Snapshot of dependencies installed | ||
├── package.json # Project metadata and dependencies | ||
├── postcss.config.mjs # Configuration for PostCSS (used with Tailwind CSS) | ||
├── public # Static assets for the project | ||
├── README.md # The file you are reading | ||
├── src # Source code of the project | ||
│ ├── app # Application-specific logic and pages | ||
│ │ ├── account # Account-related pages and components | ||
│ │ │ ├── components # Account-specific reusable components | ||
│ │ │ ├── hooks # Custom React hooks related to accounts | ||
│ │ │ │ └── useAuth.tsx # Hook to handle authentication logic | ||
│ │ │ ├── page.tsx # Account main page layout | ||
│ │ │ └── utils # Utility functions related to accounts | ||
│ │ ├── api # API routes for the application | ||
│ │ │ ├── logout # API endpoint for logging out | ||
│ │ │ ├── rest # RESTful API structure | ||
│ │ │ │ └── v1 # Version 1 of the REST API | ||
│ │ │ │ ├── isUserAdmin # Endpoint to check if a user is an admin | ||
│ │ │ │ ├── isUsername # Endpoint to validate usernames | ||
│ │ │ │ └── users # Endpoint for user-related operations | ||
│ │ ├── auth # Authentication logic and pages | ||
│ │ │ ├── action.tsx # Actions related to authentication | ||
│ │ │ ├── callback # OAuth callback handling | ||
│ │ │ ├── component # Reusable components for authentication | ||
│ │ │ ├── confirm # Route for email confirmation | ||
│ │ ├── blogs # Blog-related pages and components | ||
│ │ │ ├── components # Reusable blog components (e.g., blog cards) | ||
│ │ │ ├── fetchBlogs.jsx # Logic for fetching blogs | ||
│ │ │ ├── layout.tsx # Blog page layout | ||
│ │ ├── contact_us # Contact page for the application | ||
│ │ │ ├── components # Contact-related components | ||
│ │ │ ├── layout.tsx # Contact page layout | ||
│ │ │ └── styles.css # Styles specific to the contact page | ||
│ │ ├── event # Single event page | ||
│ │ │ └── [id] # Dynamic route for individual events | ||
│ │ │ ├── components # Components related to an event | ||
│ │ │ │ └── eventPoster.jsx # Component to display event poster | ||
│ │ ├── events # Events listing page | ||
│ │ ├── favicon.ico # App-specific favicon | ||
│ │ ├── globals.css # Global styles for the app | ||
│ │ ├── home # Home page and layout | ||
│ │ │ ├── components | ||
│ │ │ │ └── hero-parallax.tsx # Hero section with parallax effect | ||
│ │ │ ├── layout.tsx # Home page layout | ||
│ │ ├── layout.tsx # Global layout wrapper | ||
│ │ ├── members # Members section | ||
│ │ │ ├── data.json # Data for members | ||
│ │ └── test_api # Test API page for demonstration | ||
│ ├── components # Global reusable components | ||
│ │ ├── error_dialog.tsx # Component for error dialogs | ||
│ │ ├── footer.jsx # Footer component | ||
│ │ ├── navbar.jsx # Navigation bar component | ||
│ │ ├── ui # UI components (e.g., buttons, inputs) | ||
│ │ │ ├── button.tsx # Reusable button component | ||
│ │ │ ├── alert.tsx # Alert component for notifications | ||
│ │ │ ├── input.tsx # Input field component | ||
│ │ │ └── switch.tsx # Switch/toggle component | ||
│ ├── lib # Utility functions and libraries | ||
│ │ └── utils.ts # Generic utility functions | ||
│ ├── middleware.ts # Middleware for handling authentication, etc. | ||
│ ├── styles # Global styles for the project | ||
│ │ ├── blogs.css # Styles specific to the blog section | ||
│ │ ├── footer.css # Styles for the footer | ||
│ └── utils | ||
│ └── supabase # Supabase client and server configurations | ||
│ ├── client.ts # Initialize and export the Supabase client | ||
│ ├── middleware.ts # Middleware to handle Supabase session | ||
│ └── server.ts # Server-side Supabase logic | ||
├── tailwind.config.ts # Tailwind CSS configuration file | ||
└── tsconfig.json # TypeScript configuration file | ||
``` | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
### Prerequisites | ||
|
||
Ensure you have the following installed: | ||
|
||
- **Node.js** (v14.x or above) | ||
- **npm** or **yarn** | ||
- A **Supabase** account | ||
|
||
### Installation | ||
|
||
1. Clone the repository (new branch): | ||
|
||
```bash | ||
git clone -b new https://github.com/yourusername/iiitvcc.git | ||
cd iiitvcc | ||
``` | ||
|
||
2. Install dependencies: | ||
|
||
```bash | ||
npm install | ||
# or | ||
yarn install | ||
``` | ||
|
||
### Environment Variables | ||
|
||
To run the project, you need to set up environment variables. Create a `.env.local` file in the root directory and add the following: | ||
|
||
``` | ||
NEXT_PUBLIC_SUPABASE_URL=<your-supabase-url> | ||
NEXT_PUBLIC_SUPABASE_ANON_KEY=<your-supabase-anon-key> | ||
SUPABASE_STORAGE_URL=<your-storage-url> | ||
NEXT_PUBLIC_PROJECT_ID=<your-project-id> | ||
NEXT_PUBLIC_BUCKET=web_data | ||
``` | ||
You can find these variables in your Supabase project settings. | ||
## Running the Project | ||
To start the development server: | ||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
The website will be available at `http://localhost:3000`. | ||
|
||
To build the project for production: | ||
|
||
```bash | ||
npm run build | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
yarn build | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
## Contribution Guidelines | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
We welcome contributions from everyone! To contribute: | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
1. Fork the repository and create your branch: | ||
|
||
## Learn More | ||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
2. Make your changes, then commit them: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
```bash | ||
git commit -m "Add feature: description of feature" | ||
``` | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
3. Push to your forked repository: | ||
|
||
## Deploy on Vercel | ||
```bash | ||
git push origin feature/your-feature-name | ||
``` | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
4. Open a pull request to the main repository. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
Before submitting, ensure your code adheres to our coding standards and passes all linting and testing checks. | ||
|
||
### Code Linting | ||
|
||
We use **Prettier** to maintain code quality. Run the following command to lint your code: | ||
|
||
```bash | ||
npm run pretty | ||
``` |
b019eab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for iiitvcc ready!
✅ Preview
https://iiitvcc-vyo0micnp-iiitv-coding-clubs-projects.vercel.app
Built with commit b019eab.
This pull request is being automatically deployed with vercel-action