Skip to content

Commit

Permalink
Merge branch 'main' into new_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
haseebzaki-07 authored Oct 25, 2024
2 parents 464d284 + e729ef1 commit b4d2641
Show file tree
Hide file tree
Showing 38 changed files with 1,958 additions and 291 deletions.
4 changes: 4 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your-cloudinary-name
NEXT_PUBLIC_CLOUDINARY_API_KEY=your-cloudinary-api-key
101 changes: 101 additions & 0 deletions .github/scripts/update_structure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import os
import github
from github import Github

# Helper function to recursively build the repo structure and include file extensions
def get_repo_structure(path='.', prefix=''):
structure = []
try:
items = sorted(os.listdir(path))
except FileNotFoundError:
print(f"Path not found: {path}")
return structure

for i, item in enumerate(items):
if item.startswith('.'):
continue # Skip hidden files and directories
item_path = os.path.join(path, item)
is_last = i == len(items) - 1
current_prefix = '└── ' if is_last else '├── '

if os.path.isdir(item_path):
# Directory case
structure.append(f"{prefix}{current_prefix}{item}/")
next_prefix = prefix + (' ' if is_last else '│ ')
structure.extend(get_repo_structure(item_path, next_prefix))
else:
# File case with extension
file_name, file_extension = os.path.splitext(item)
structure.append(f"{prefix}{current_prefix}{file_name}{file_extension}")

return structure

# Function to update the repo_structure.txt file
def update_structure_file(structure):
try:
with open('repo_structure.txt', 'w') as f:
f.write('\n'.join(structure))
print("repo_structure.txt updated successfully.")
except IOError as e:
print(f"Error writing to repo_structure.txt: {e}")

# Function to update the README.md with the new structure
def update_README(structure):
try:
with open('PROJECT_STRUCTURE.md', 'r') as f:
content = f.read()
except FileNotFoundError:
print("PROJECT_STRUCTURE.md not found.")
return

start_marker = '<!-- START_STRUCTURE -->'
end_marker = '<!-- END_STRUCTURE -->'

start_index = content.find(start_marker)
end_index = content.find(end_marker)

if start_index != -1 and end_index != -1:
new_content = (
content[:start_index + len(start_marker)] +
'\n```\n' + '\n'.join(structure) + '\n```\n' +
content[end_index:]
)
try:
with open('PROJECT_STRUCTURE.md', 'w') as f:
f.write(new_content)
print("PROJECT_STRUCTURE.md updated with new structure.")
except IOError as e:
print(f"Error writing to PROJECT_STRUCTURE.md: {e}")
else:
print("Markers not found in PROJECT_STRUCTURE.md. Structure not updated.")

# Main function to compare and update repository structure
def main():
gh_token = os.getenv('GH_TOKEN')
gh_repo = os.getenv('GITHUB_REPOSITORY')

if not gh_token or not gh_repo:
print("Environment variables GH_TOKEN and GITHUB_REPOSITORY must be set.")
return

g = Github(gh_token)
repo = g.get_repo(gh_repo)

current_structure = get_repo_structure()

try:
# Fetch the contents of repo_structure.txt from GitHub
contents = repo.get_contents("repo_structure.txt")
existing_structure = contents.decoded_content.decode().split('\n')
except github.GithubException:
existing_structure = None

if current_structure != existing_structure:
update_structure_file(current_structure)
update_README(current_structure)
print("Repository structure updated.")
else:
print("No changes in repository structure.")

if __name__ == "__main__":
main()
27 changes: 27 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches: [main]
issues:
types: [opened]
pull_request_target:
types: [opened]

jobs:
welcome:
runs-on: ubuntu-latest
steps:
- name: Commitment Issues Bot
run: echo "GITHUB_ACTOR=YourBotName" >> $GITHUB_ENV
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
🎉 Thank you for raising an issue in this repository!
We’ll review and assign it to you soon.
In the meantime, feel free to ⭐ the repo for updates.
Stay awesome! 😎
pr-message: |
🚀 We’re grateful for your pull request and the effort you put into it!
🔍 A maintainer will review it as soon as possible.
We’ll provide feedback if needed and merge it once approved.
Thanks for being an awesome part of our community! 💪
39 changes: 39 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Update Repository structure

on:
schedule:
- cron: '0 * * * *' # Run every hour
workflow_dispatch: # Allow manual triggering
push:
branches:
- main
- master

jobs:
detect-and-update-structure:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub
- name: Run update script
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/update_structure.py

- name: Commit and push if changed
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push)
130 changes: 130 additions & 0 deletions PROJECT_STRUCTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
## Project Structure ✨

<!-- START_STRUCTURE -->
```
├── LICENSE
├── PROJECT_STRUCTURE.md
├── README.md
├── code_of_conduct.md
├── components.json
├── contributing.md
├── jsconfig.json
├── next.config.mjs
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public/
│ ├── Logo.svg
│ ├── Newsletter.png
│ ├── avatar.png
│ ├── avatar1.png
│ ├── goal.webp
│ ├── hack1.jpg
│ ├── img1.jpg
│ ├── mission.webp
│ ├── sopt4.jpg
│ ├── spot1.jpg
│ ├── spot2.jpg
│ ├── spot3.jpg
│ └── vision.webp
├── repo_structure.txt
├── src/
│ ├── app/
│ │ ├── (pages)/
│ │ │ ├── About/
│ │ │ │ └── page.jsx
│ │ │ ├── Events/
│ │ │ │ ├── EventItem.js
│ │ │ │ ├── Events.css
│ │ │ │ └── page.jsx
│ │ │ ├── FAQsForum/
│ │ │ │ ├── FAQs.js
│ │ │ │ ├── Posts.css
│ │ │ │ ├── Posts.js
│ │ │ │ └── page.jsx
│ │ │ ├── Hackathon/
│ │ │ │ ├── Card.jsx
│ │ │ │ └── page.jsx
│ │ │ ├── Projects/
│ │ │ │ ├── Card.jsx
│ │ │ │ └── page.jsx
│ │ │ ├── Resources/
│ │ │ │ ├── [id]/
│ │ │ │ │ └── page.jsx
│ │ │ │ ├── page.jsx
│ │ │ │ └── resources.js
│ │ │ ├── SignIn/
│ │ │ │ └── page.jsx
│ │ │ ├── SignUp/
│ │ │ │ └── page.jsx
│ │ │ ├── SingleEvent/
│ │ │ │ └── [id]/
│ │ │ │ └── page.jsx
│ │ │ ├── Subscribe/
│ │ │ │ └── page.jsx
│ │ │ ├── TeamsGallery/
│ │ │ │ ├── Teams.js
│ │ │ │ └── page.jsx
│ │ │ └── careers/
│ │ │ └── page.jsx
│ │ ├── favicon.ico
│ │ ├── fonts/
│ │ │ ├── GeistMonoVF.woff
│ │ │ └── GeistVF.woff
│ │ ├── globals.css
│ │ ├── images/
│ │ │ ├── ai_img.jpg
│ │ │ └── teamMember.jpg
│ │ ├── layout.js
│ │ ├── not-found.jsx
│ │ └── page.js
│ ├── components/
│ │ ├── Global/
│ │ │ ├── Footer.jsx
│ │ │ ├── Header.jsx
│ │ │ └── Hero.jsx
│ │ └── ui/
│ │ ├── aspect-ratio.jsx
│ │ ├── back2top.jsx
│ │ ├── badge.jsx
│ │ ├── breadcrumb.jsx
│ │ ├── button.jsx
│ │ ├── card.jsx
│ │ ├── carousel.jsx
│ │ ├── collapsible.jsx
│ │ ├── command.jsx
│ │ ├── dialog.jsx
│ │ ├── drawer.jsx
│ │ ├── dropdown-menu.jsx
│ │ ├── homepage.jsx
│ │ ├── hover-card.jsx
│ │ ├── input.jsx
│ │ ├── label.jsx
│ │ ├── menubar.jsx
│ │ ├── navigation-menu.jsx
│ │ ├── notification.jsx
│ │ ├── progress-bar.jsx
│ │ ├── progress.jsx
│ │ ├── resizable.jsx
│ │ ├── select.jsx
│ │ ├── separator.jsx
│ │ ├── sheet.jsx
│ │ ├── skeleton.jsx
│ │ ├── sonner.jsx
│ │ ├── switch.jsx
│ │ ├── tabs.jsx
│ │ ├── textarea.jsx
│ │ ├── toast.jsx
│ │ ├── toaster.jsx
│ │ └── tooltip.jsx
│ ├── hooks/
│ │ └── use-toast.js
│ ├── lib/
│ │ ├── Hackathon.js
│ │ ├── Projects.js
│ │ └── utils.js
│ └── public/
│ └── GDSC-RCIIT Logo.png
└── tailwind.config.js
```
<!-- END_STRUCTURE -->
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

Welcome to the official repository of the **GDG on Campus RCCIIT** website! This project is an open-source initiative aimed at building a modern, interactive, and feature-rich platform for our **Google Developer Group (GDG)**. We invite developers, designers, and content creators from all over to contribute and make this project a success!

## 📈 GitHub Repository Stats
| 🌟 **Stars** | 🍴 **Forks** | 🐛 **Issues** | 🔔 **Open PRs** | 🔕 **Closed PRs** | 🛠️ **Languages** |**Contributors** |
|--------------|--------------|---------------|-----------------|------------------|------------------|------------------|
| ![GitHub stars](https://img.shields.io/github/stars/GDSC-RCCIIT/gdg-website) | ![forks](https://img.shields.io/github/forks/GDSC-RCCIIT/gdg-website) | ![issues](https://img.shields.io/github/issues/GDSC-RCCIIT/gdg-website?color=32CD32) | ![pull requests](https://img.shields.io/github/issues-pr/GDSC-RCCIIT/gdg-website?color=FFFF8F) | ![Closed PRs](https://img.shields.io/github/issues-pr-closed/GDSC-RCCIIT/gdg-website?color=20B2AA) | ![Languages](https://img.shields.io/github/languages/count/GDSC-RCCIIT/gdg-website?color=20B2AA) | ![Contributors](https://img.shields.io/github/contributors/GDSC-RCCIIT/gdg-website?color=00FA9A) |

## Project Structure ✨

Check the project structure here [Project Structure](PROJECT_STRUCTURE.md)

## ✨ Tech Stack
- **Frontend**: Next.js, Tailwind CSS

Expand Down Expand Up @@ -48,13 +57,9 @@ We welcome everyone to contribute to the GDG RCCIIT website! Please review our [
npm install
```

3. **Set Up Environment Variables**:
Create a `.env.local` file and add the following:
```env
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your-cloudinary-name
NEXT_PUBLIC_CLOUDINARY_API_KEY=your-cloudinary-api-key
3. **Set Up Environment Variables**:
```bash
cp .env.example .env.local
```

4. **Run the Development Server**:
Expand Down
Binary file added public/dev1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev6.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dev7.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/hack1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sopt4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/spot1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/spot2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/spot3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b4d2641

Please sign in to comment.