-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from ItaloMedici/feature/stripe
Feature/stripe
- Loading branch information
Showing
79 changed files
with
2,973 additions
and
353 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,11 +1,14 @@ | ||
NEXTAUTH_URL=http://localhost:3000 | ||
NEXTAUTH_SECRET=SOME_RANDOM_SECRET | ||
|
||
DATABASE_URL="DATABASE_URL" | ||
DATABASE_URL="postgres://user:password@host:5432/dbname?sslmode=require" | ||
|
||
NEXT_PUBLIC_SITE_URL=http://localhost:3000 | ||
SITE_URL=http://localhost:3000 | ||
|
||
GOOGLE_CLIENT_ID=GOOGLE_CLIENT_ID | ||
GOOGLE_CLIENT_SECRET=GOOGLE_CLIENT_SECRET | ||
|
||
MAXIMUM_PLAYERS_PER_BOARD=99999 | ||
STRIPE_SECRET_KEY=STRIPE_SECRET_KEY | ||
STRIPE_PUBLISH_KEY=STRIPE_PUBLISH_KEY | ||
STRIPE_WEBHOOK_SECRET=STRIPE_WEBHOOK_SECRET | ||
FREE_PLAN_PRICE_ID=FREE_PLAN_PRICE_ID |
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2025 Ítalo Médici | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,88 @@ | ||
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). | ||
<div align="center"> | ||
<img src="https://i.imgur.com/IZBsCgh.png" alt="Pontim Logo" width="250"/> | ||
|
||
# 🃏 Pontim - The Open-Source Scrum Poker Platform | ||
|
||
[](LICENSE) [](https://github.com/ItaloMedici/pontim/releases) [](https://github.com/ItaloMedici/pontim/graphs/contributors) [](https://github.com/ItaloMedici/pontim/issues) | ||
|
||
## Getting Started | ||
</div> | ||
|
||
First, run the development server: | ||
**Pontim** is an open-source, interactive Scrum Poker platform that helps agile teams estimate story points collaboratively and in real time. 🚀 | ||
It offers an engaging and efficient way to vote on story complexity using **Fibonacci numbers**, with a unique interactive experience where players can grab attention using sounds. 🔊 | ||
|
||
```bash | ||
## ✨ Features | ||
|
||
✔️ **Live Voting** – Players can vote in real-time and see the average selection. | ||
✔️ **Interactive Notifications** – Grab teammates' attention with sound alerts. | ||
✔️ **Customizable Rooms** – Create rooms with different limits based on your plan. | ||
✔️ **Google OAuth Authentication** – Quick and easy login with Google. | ||
✔️ **Stripe Integration** – Subscription-based plans for premium features. | ||
|
||
## 🛠️ Tech Stack | ||
|
||
Pontim is built with modern technologies to ensure a seamless and scalable experience: | ||
|
||
| Tech | Purpose | | ||
|---------------------|-----------------------------------------------| | ||
| **Next.js** | Frontend framework for server-side rendering | | ||
| **React** | UI library for interactive components | | ||
| **Prisma** | ORM for PostgreSQL database | | ||
| **PostgreSQL** | Relational database for persistent storage | | ||
| **NextAuth** | Authentication provider using Google OAuth | | ||
| **Stripe** | Payment gateway for subscriptions | | ||
| **Docker** | Containerization for deployment | | ||
|
||
## 🚀 Getting Started | ||
|
||
### 1 - **Clone the Repository** | ||
```sh | ||
git clone https://github.com/ItaloMedici/pontim.git | ||
cd pontim | ||
``` | ||
|
||
### 2 - **Install Dependencies** | ||
```sh | ||
npm install | ||
``` | ||
|
||
### 3 - **Set Up Environment Variables** | ||
Create a `.env.exemple` file in the root folder and add the necessary variables: | ||
```ini | ||
NEXTAUTH_URL=http://localhost:3000 | ||
NEXTAUTH_SECRET=your-secret | ||
DATABASE_URL=your-db-url | ||
... | ||
``` | ||
|
||
### 4 - **Run the Project Locally** | ||
```sh | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
Visit `http://localhost:3000` to start using Pontim! 🎉 | ||
|
||
--- | ||
|
||
## 🤝 Contributing | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
We welcome contributions from the community! To contribute: | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
1. **Fork the repository** and create a new branch. | ||
2. Implement your feature or fix. | ||
3. Submit a **Pull Request (PR)** with a detailed description. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
--- | ||
|
||
## Learn More | ||
## 🐝 License | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
Pontim is open-source and released under the **MIT License**. See [LICENSE](LICENSE) for details. | ||
|
||
- [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. | ||
--- | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
## 📚 Learning Purpose | ||
|
||
## Deploy on Vercel | ||
This project is designed as a **learning experience** for building **SaaS applications**, working with **real-time interactions**, and implementing **scalable architectures**. Feel free to explore, contribute, and improve Pontim! 🚀 | ||
|
||
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. | ||
--- | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
👨💻 **Developed by:** [Ítalo Médici](https://github.com/ItaloMedici) | ||
🌟 **Star this project** if you find it useful! 🚀 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"use client"; | ||
|
||
import { LoadingLogo } from "@/components/loading-logo/loading"; | ||
import { Suspense } from "react"; | ||
|
||
const LogoutLayout = ({ children }) => { | ||
return <Suspense fallback={<LoadingLogo />}>{children}</Suspense>; | ||
}; | ||
|
||
export default LogoutLayout; |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use client"; | ||
|
||
import { signOut } from "next-auth/react"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { useEffect } from "react"; | ||
|
||
const LogoutPage = () => { | ||
const searchParams = useSearchParams(); | ||
const callbackUrl = searchParams.get("callbackUrl") || "/"; | ||
|
||
useEffect(() => { | ||
signOut({ | ||
redirect: true, | ||
callbackUrl, | ||
}); | ||
}); | ||
|
||
return null; | ||
}; | ||
|
||
export default LogoutPage; |
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
18 changes: 18 additions & 0 deletions
18
app/(dashboard)/home/_components/messages/errors-messages.tsx
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use client"; | ||
|
||
import { toast } from "@/components/toast"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { useEffect } from "react"; | ||
|
||
export const ErrorsMessages = () => { | ||
const searchParams = useSearchParams(); | ||
const error = searchParams.get("error"); | ||
|
||
useEffect(() => { | ||
if (typeof error === "string") { | ||
toast.error(error); | ||
} | ||
}, [error]); | ||
|
||
return null; | ||
}; |
Oops, something went wrong.