Skip to content

Commit

Permalink
Merge branch 'main' into feature/NaturePage
Browse files Browse the repository at this point in the history
  • Loading branch information
dev129 authored Oct 26, 2024
2 parents 039a5a1 + 62ccf36 commit be6c666
Show file tree
Hide file tree
Showing 27 changed files with 1,489 additions and 288 deletions.
1 change: 1 addition & 0 deletions File_Structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src="https://github.com/ajaynegi45/Uttarakhand-Culture-NewUI/blob/main/UK-Structure.png" />
166 changes: 94 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,91 @@
# Uttarakhand Culture New UI


### Introduction

Welcome to the Uttarakhand Culture Preservation Project! We're dedicated to saving and promoting the rich cultural heritage of Uttarakhand. Our platform digitally documents and celebrates the region's culture, history, and natural beauty, making it accessible to the younger generation and preserving it for future generations.

<a href="https://uttarakhand-culture.vercel.app/" target="_blank">This UI Link</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<a href="https://ukculture.netlify.app/" target="_blank">Old UI link</a>
<br/><br/>
<a href="https://www.figma.com/design/o82aPjIzHairrkqhem3S1Q/New-UI?node-id=252-38&t=pnd9LeK6OUwhckbh-1" target="_blank">Figma Design</a>

### Problem
A concerning trend is emerging in Uttarakhand, where the younger generation is gradually forgetting their cultural heritage and traditional rituals. This decline in cultural knowledge is evident across generations, with each successive generation possessing less knowledge than the previous one. For instance, the amount of cultural knowledge possessed by grandparents is significantly more than that of their children, and the cultural knowledge of today's youth is likely to be even less than that of their parents. If this trend continues, there is a risk that the cultural heritage of Uttarakhand may eventually disappear from the society. This loss would not only erase the region's rich cultural identity but also deprive future generations of their cultural roots and traditions.

To address this problem, we have come up with a solution to digitize this cultural knowledge. Since today's generation is more comfortable with technology, we aim to provide a platform where they can learn about their cultural heritage using their devices, from anywhere in the world. By doing so, we hope to make cultural knowledge more accessible and engaging for the younger generation, and thus help preserve the rich cultural heritage of Uttarakhand.

Our platform offers a comprehensive journey through Uttarakhand's culture, history, and natural beauty. Discover:

1. **Language**: Kumaoni, Garhwali, and Jaunsari <br/>
2. **Cultural Stories**: Historical kings, famous personalities, and regional tales <br/>
3. **History**: Uttarakhand's past, notable movements and person<br/>
4. **Spiritual Heritage**: Temple, deitie and architectural wonders <br/>
5. **Cuisine**: Authentic recipes and traditional cooking methods <br/>
6. **Festivals & Events**: Upcoming cultural events, festivals, and fairs <br/>
7. **Art & Craft**: Traditional art, handicrafts, and local artisans <br/>
8. **Music & Dance**: Regional music, unique instruments, and traditional dances <br/>
9. **Traditional Dresses**: Discover the cultural and historical significance of these outfits. <br/>
10. **Tourist Treasures**: Get travel tips and recommendations for an unforgettable experience. <br/>
11. **Nature**: Flora, fauna, Glaciers , Rivers, Peaks & Mountains <br/>
12. **User-Suggested Features**: Your Voice Matters
- **Have a Feature in Mind? Share Your Ideas!**
- If you believe there's a particular aspect of Uttarakhand's culture, history, or nature that should be featured on our website, we welcome your suggestions.
- Send us an email or create issues on Github with your proposed feature and details. We value your input and will carefully review each submission.
- If we find your suggestion aligns with our mission to provide valuable and insightful content, we'll gladly incorporate it into our website, giving credit where it's due.
- Together, we can create a more comprehensive resource that truly reflects the richness of Uttarakhand.

<!-- ### How to use [Old website](https://ukculture.netlify.app)
[![How to use this website](hhttps://github.com/user-attachments/assets/c1dc7a9e-50c9-4844-82dc-5ef51f4bdd79
)](https://github.com/user-attachments/assets/c1dc7a9e-50c9-4844-82dc-5ef51f4bdd79
) -->

## Your Feedback Matters

If you find any errors or inaccuracies, please let us know through our contact form. We'll update the information and appreciate your help in keeping our content accurate.

You can also support us by contributing content or ideas. Fill out our contact form, and we'll connect with you soon. Your feedback will help us update and enhance our information.


# **How to Contribute to this Project** 👨🏻‍💻

You can be a valuable part of our mission to showcase the rich culture, history, and nature of Uttarakhand. We welcome contributions in both code and non-code forms.

Before making any contributions, please read the [Readme.md](https://github.com/ajaynegi45/Uttarakhand-Culture-NewUI/blob/main/README.md) file carefully to better understand the project's goals and purpose. This will give you clarity on our mission. Also, make sure to review the [Contributing.md](https://github.com/ajaynegi45/Uttarakhand-Culture-NewUI/blob/main/contributing.md) file, which contains important guidelines to make the contribution process smoother, especially for newcomers.
# 🌄 Uttarakhand Culture Preservation Project

### **Introduction**
Welcome to the Uttarakhand Culture Preservation Project! 🎉 We're dedicated to saving and promoting the rich cultural heritage of Uttarakhand. Our platform digitally documents and celebrates the region's culture, history, and natural beauty, making it accessible to the younger generation and preserving it for future generations.

- **New UI**: [Explore the New UI](https://uttarakhand-culture.vercel.app/)
- **Old UI**: [Visit the Old UI](https://ukculture.netlify.app/)
- **Figma Design**: [Check out our Figma Design](https://www.figma.com/design/o82aPjIzHairrkqhem3S1Q/New-UI?node-id=252-38&t=pnd9LeK6OUwhckbh-1)

<table align="center">
<thead align="center">
<tr border: 2px;>
<td><b>🌟 Stars</b></td>
<td><b>🍴 Forks</b></td>
<td><b>🐛 Issues</b></td>
<td><b>🔔 Open PRs</b></td>
<td><b>🔕 Close PRs</b></td>
</tr>
</thead>
<tbody>
<tr>
<td><img alt="Stars" src="https://img.shields.io/github/stars/ajaynegi45/Uttarakhand-Culture-NewUI?style=flat&logo=github"/></td>
<td><img alt="Forks" src="https://img.shields.io/github/forks/ajaynegi45/Uttarakhand-Culture-NewUI?style=flat&logo=github"/></td>
<td><img alt="Issues" src="https://img.shields.io/github/issues/ajaynegi45/Uttarakhand-Culture-NewUI?style=flat&logo=github"/></td>
<td><img alt="Open Pull Requests" src="https://img.shields.io/github/issues-pr/ajaynegi45/Uttarakhand-Culture-NewUI?style=flat&logo=github"/></td>
<td><img alt="Close Pull Requests" src="https://img.shields.io/github/issues-pr-closed/ajaynegi45/Uttarakhand-Culture-NewUI?style=flat&color=green&logo=github"/></td>
</tr>
</tbody>
</table>

<!--line-->
<img src="https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif" width="1920" />

### **Problem**
🔍 A concerning trend is emerging in Uttarakhand:
- The younger generation is gradually forgetting their cultural heritage and traditional rituals.
- Each successive generation possesses less cultural knowledge than the previous one. For instance:
- **Grandparents** hold significantly more cultural knowledge than their children.
- **Today's youth** are likely to have even less cultural understanding than their parents.

If this trend continues, Uttarakhand's cultural heritage risks disappearing, erasing the region's identity and depriving future generations of their cultural roots.

<!--line-->
<img src="https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif" width="1920" />

### **Our Solution**
💡 **Digitizing Cultural Knowledge**: We aim to create a platform for the younger generation to learn about their cultural heritage using their devices, from anywhere in the world.

### **Comprehensive Journey Through Culture**: Discover the following aspects of Uttarakhand's rich culture:

1. **🗣️ Language**: Kumaoni, Garhwali, and Jaunsari
2. **📖 Cultural Stories**: Historical kings, famous personalities, and regional tales
3. **⏳ History**: Uttarakhand's past, notable movements, and personalities
4. **🕌 Spiritual Heritage**: Temples, deities, and architectural wonders
5. **🍽️ Cuisine**: Authentic recipes and traditional cooking methods
6. **🎉 Festivals & Events**: Upcoming cultural events, festivals, and fairs
7. **🎨 Art & Craft**: Traditional art, handicrafts, and local artisans
8. **🎶 Music & Dance**: Regional music, unique instruments, and traditional dances
9. **👗 Traditional Dresses**: Cultural and historical significance of these outfits
10. **🏞️ Tourist Treasures**: Travel tips and recommendations for an unforgettable experience
11. **🌳 Nature**: Flora, fauna, glaciers, rivers, peaks, and mountains
12. **🗳️ User-Suggested Features**: Your Voice Matters!
- **💭 Have a feature in mind? Share your ideas!**
- Send us an email or create issues on GitHub with your proposed feature and details.
- We will review each submission and incorporate suggestions that align with our mission.

<!--line-->
<img src="https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif" width="1920" />

### **Your Feedback Matters** 📝
If you find any errors or inaccuracies, please let us know through our contact form. Support us by contributing content or ideas. Fill out our contact form, and we'll connect with you soon.

<!--line-->
<img src="https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif" width="1920" />

### **How to Contribute to this Project** 👨🏻‍💻
You can be a valuable part of our mission to showcase Uttarakhand's rich culture, history, and nature. We welcome contributions in both code and non-code forms.

1. **📚 Read the Guidelines**: Before contributing, read the [Readme.md](https://github.com/ajaynegi45/Uttarakhand-Culture-NewUI/blob/main/README.md) file carefully to understand the project's goals and purpose.
2. **📑 Review the Contribution Guidelines**: Make sure to check the [Contributing.md](https://github.com/ajaynegi45/Uttarakhand-Culture-NewUI/blob/main/contributing.md) file for important guidelines.



### **Contact** 📬
If you have any questions or would like to connect, please don't hesitate to reach out. I'd be more than happy to chat and learn from your experiences too.

<br>

# Contact
If you have any questions or would like to connect, please don't hesitate to reach out. I'd be more than happy to chat and learn from your experiences too.
<br><br>
<div>
<!-- LinkedIn -->
<a href="https://linkedin.com/in/ajaynegi45/"><img align="center" src="https://img.icons8.com/color/48/linkedin.png" alt="ajaynegi45/" width="40" height="40" t/></a>
Expand All @@ -70,35 +96,31 @@ If you have any questions or would like to connect, please don't hesitate to rea
</div>
<br>

# Acknowledgements
<!--line-->
<img src="https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif" width="1920" />

This project wouldn't be possible without the contributions of our amazing community. Thank you for being part of our journey! 🙌
### **Acknowledgements** 🙏
This project wouldn't be possible without the contributions of our amazing community. Thank you for being part of our journey!

<a href = "https://github.com/Uttarakhand-Culture/Frontend/graphs/contributors">
<img src = "https://contrib.rocks/image?repo=ajaynegi45/Uttarakhand-Culture-NewUI"/>
<a href="https://github.com/Uttarakhand-Culture/Frontend/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ajaynegi45/Uttarakhand-Culture-NewUI"/>
</a>

<br/>

### Stargazers

### **Stargazers** 🌟
<p align="center">
<i>If you like Uttarakhand Culture Preservation Project, please <a href="../../stargazers">★</a> star this repository to show your support! 🤩</i>
<br/>
<!-- <a href="https://star-history.com/#ajaynegi45/Uttarakhand-Culture-Preservation-Project&Date"> -->
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ajaynegi45/Uttarakhand-Culture-NewUI&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ajaynegi45/Uttarakhand-Culture-NewUI&type=Date" />
<img align="center" alt="Star History Chart" src="https://api.star-history.com/svg?repos=ajaynegi45/Uttarakhand-Culture-NewUI&type=Date" />
</picture>
<!-- </a> -->
</p>

---

We appreciate your interest in preserving Uttarakhandi culture. Together, we can ensure that this invaluable heritage is passed down to future generations.

<br/>

We appreciate your interest in preserving Uttarakhandi culture. Together, we can ensure that this invaluable heritage is passed down to future generations. 🌍❤️

Made with ❤️ by Uttarakhand Culture Community
### Made with ❤️ by Uttarakhand Culture Community
Binary file added UK-Structure.png
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/about1.png
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/about2.png
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/eye-hide.png
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/eye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions public/mapClick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import About from '@/components/about/About'
const page = () => {
return (
<div>
<About/>
</div>
)
}

export default page
36 changes: 15 additions & 21 deletions src/app/api/auth/resend-otp/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { db } from "@/lib/drizzle";
import { otps } from "@/lib/schema";
import { NextRequest, NextResponse } from "next/server";
Expand All @@ -8,66 +7,61 @@ import otpEmailTemplate from "@/lib/templates/otp-template";
import { auth } from "@/auth";
import mailer from "@/lib/mailer";



// `[email protected]` email is for development only
const senderEmail = process.env.SENDER_EMAIL || "[email protected]";


export async function POST(req: NextRequest) {
try {
const session = await auth();
if (!session) throw new Error("Login first to verify email")
if (!session) throw new Error("Login first to verify email");

const userWithEmail = await db.query.users.findFirst({
where: (users, { eq }) => eq(users.email, session.user.email!),
});

if (!userWithEmail) throw new Error("User with email not exists.");


const prevOtps = await db.query.otps.findMany({
where: (otps, { eq }) => eq(otps.userId, userWithEmail.id),
orderBy: (otps, { desc }) => desc(otps.expiresAt),
})
});

// Check if there is a valid OTP
const now = new Date();
const validOtp = prevOtps.find(otp => otp.expiresAt > now);
const validOtp = prevOtps.find((otp) => otp.expiresAt > now);

if (validOtp) {
const remainingTimeInSeconds = Math.floor((validOtp.expiresAt.getTime() - now.getTime()) / 1000); // Time in seconds
const remainingTimeInSeconds = Math.floor(
(validOtp.expiresAt.getTime() - now.getTime()) / 1000
); // Time in seconds
const minutes = Math.floor(remainingTimeInSeconds / 60); // Full minutes
const seconds = remainingTimeInSeconds % 60; // Remaining seconds

return NextResponse.json({ message: `Please wait ${minutes} minutes and ${seconds} seconds before resending the OTP.` }, { status: 429 });
return NextResponse.json(
{
message: `Please wait ${minutes} minutes and ${seconds} seconds before resending the OTP.`,
},
{ status: 429 }
);
}

const otp = Math.floor(100000 + Math.random() * 900000).toString(); // 6-digit OTP
// Set expiration time (e.g., 10 minutes from now)
const expiresAt = new Date(Date.now() + 10 * 60 * 1000); // 10 minutes in the future



await db.insert(otps).values({
expiresAt,
otp,
userId: userWithEmail.id,
createdAt: new Date(),
});




await mailer.sendMail({
from: `Uttarakhand Culture <${senderEmail}>`,
to: [userWithEmail.email!],
subject: 'Verify you email with OTP',
subject: "Verify you email with OTP",
html: otpEmailTemplate(userWithEmail.name!, otp),
})



});

return NextResponse.json({
message: `OTP has been resent to your email.`,
Expand All @@ -79,4 +73,4 @@ export async function POST(req: NextRequest) {
console.log("[OTP_RESEND_ERROR]: ", error);
return NextResponse.json({ error: error.message }, { status: 500 });
}
}
}
Loading

0 comments on commit be6c666

Please sign in to comment.