A decentralized Birthday Reminder dApp that lets users store, manage, and track birthdays directly on-chain using a smart contract deployed on the Flare Coston2 testnet. The project includes a TypeScript/Next.js front-end integrated with the smart contract via wagmi and viem.
- Network: Flare Coston2 Testnet
- Contract Address:
0x7EBf2132EaF7a2C40579De26D03F190da661b83E - Block Explorer:
https://coston2-explorer.flare.network/address/0x7EBf2132EaF7a2C40579De26D03F190da661b83E
Remembering birthdays across friends, family, and important contacts can be tedious and error-prone, especially when managed across multiple apps or devices. This project provides an on-chain birthday registry, allowing each wallet address to securely store and manage its own list of birthdays.
The core of the project is the BirthdayReminder smart contract, which:
- Lets users add birthdays (with a name and date).
- Returns the full list of birthdays associated with the caller.
- Exposes a helper function to check which stored birthdays match a specific day and month (e.g., today’s date).
- Emits events when birthdays are added or when upcoming birthdays are detected.
The front-end dApp offers a clean UI to:
- Add new birthdays via a simple form.
- View all birthdays associated with the connected wallet.
- See a list of birthdays that fall on the current day.
- Remove birthdays by index when they are no longer needed.
All data is stored on-chain, ensuring transparency and persistence as long as the network exists.
-
Add Birthday
- Function:
addBirthday(string _name, uint8 _day, uint8 _month, uint16 _year) - Stores a birthday record for the message sender.
- Emits a
BirthdayAddedevent with the user address and birthday details.
- Function:
-
Get Birthday Count
- Function:
getBirthdayCount() - Returns the total number of birthdays stored in the contract (useful for analytics or global stats).
- Function:
-
Get My Birthdays
- Function:
getMyBirthdays() - Returns an array of
Birthdaystructs associated with the caller (msg.sender), including:name(string)day(uint8)month(uint8)year(uint16)exists(bool)
- Function:
-
Check Today’s Birthdays
- Function:
checkTodaysBirthdays(uint8 _currentDay, uint8 _currentMonth) - Returns an array of names (
string[]) whose birthdays match the given day and month for the caller. - Can be called from the front-end with the current date to list today’s birthdays.
- Function:
-
Get Single Birthday By Index
- Function:
getBirthday(uint256 _index) - Returns detailed birthday data for a specific index.
- Function:
-
Remove Birthday
- Function:
removeBirthday(uint256 _index) - Allows a user to remove a birthday by index, enabling simple management and cleanup.
- Function:
-
Contract Info
- Function:
getContractInfo() - Returns a human-readable string describing the contract (e.g., for display in the UI header or info section).
- Function:
-
Events
BirthdayAdded(address user, string name, uint8 day, uint8 month, uint16 year)UpcomingBirthday(address user, string name, uint8 day, uint8 month)
-
Wallet Gating
- Users must connect a Web3 wallet (via wagmi) before interacting with the contract.
- If no wallet is connected, the UI shows a friendly prompt instead of the main interface.
-
Add Birthday UI
- Simple form fields for:
- Name
- Day (DD)
- Month (MM)
- Year (YYYY)
- Lightweight client-side validation (e.g., date ranges) before sending transactions.
- Simple form fields for:
-
List of User Birthdays
- Displays all birthdays associated with the connected wallet.
- Shows index, name, and formatted date.
- Includes a quick “Remove” button for each entry that calls
removeBirthday(index).
-
Today’s Birthdays Section
- Uses
checkTodaysBirthdayswith the client’s current day and month. - Shows a list of names whose birthdays fall on the current date.
- Displays a fallback message when no birthdays are recorded for today.
- Uses
-
Transaction Status & Error Handling
- Shows transaction hash once a write transaction is sent.
- Displays “Waiting for confirmation…” while the transaction is pending on-chain.
- Confirms success with a “Transaction confirmed!” message.
- Surfaces any error messages in a dedicated error card.
-
Responsive & Clean UI
- Built using React/Next.js with Tailwind CSS-style utility classes (via the project’s design system).
- Optimized for both desktop and mobile layouts.
Managing birthdays usually happens across:
- Phone contacts
- Calendar apps
- Social media reminders
- Notes or spreadsheets
These solutions are often:
- Centralized – locked into a single platform or device.
- Fragmented – spread across different apps and accounts.
- Not portable – switching devices or platforms can mean losing or duplicating data.
For Web3-native users and projects, there is a need for:
- A wallet-native, portable, and verifiable way to store small but meaningful pieces of data like birthdays.
- A solution that can be integrated into other dApps, DAOs, or communities to personalize experiences (e.g., automated “Happy Birthday” messages, NFT airdrops, or reward distributions).
This project provides an on-chain birthday registry tightly coupled with wallet addresses:
-
Wallet-Centric Identity
- Birthdays are stored per wallet address, not per app or device.
- Any dApp that knows the contract address and ABI can read or use this data for custom logic.
-
Decentralized Storage
- All birthday data is recorded on-chain on the Flare Coston2 testnet.
- As long as the network is live, the data is accessible and verifiable from anywhere.
-
Composable On-Chain Data
- Other contracts or dApps can:
- Call
getMyBirthdays()for personalized experiences. - Use
checkTodaysBirthdays()to send greetings, airdrop tokens, or issue special NFTs on a user’s birthday.
- Call
- Simple indexing by index and count makes integration straightforward.
- Other contracts or dApps can:
-
User-Controlled
- Users can add and remove birthdays themselves.
- No central authority can edit or censor their birthday entries.
- Birthdays are associated with their wallet, allowing easy migration between interfaces and front-ends.
-
Personal Birthday Tracker
- A user maintains their personal or family birthday list on-chain and uses this dApp as a front-end to manage it.
-
Community or DAO Tools
- A DAO integrates this contract to automatically celebrate member birthdays with:
- Governance token bonuses
- POAP-style NFTs
- Special Discord roles or on-chain badges
- A DAO integrates this contract to automatically celebrate member birthdays with:
-
Web3 Social or Messaging Apps
- A Web3-native social dApp or messaging app reads from the contract to:
- Show birthday reminders in the UI
- Trigger notifications or custom messages on a user’s birthday
- A Web3-native social dApp or messaging app reads from the contract to:
-
Gifting & Airdrops
- Another contract or script periodically runs:
- For each user, call
checkTodaysBirthdaysand send a small gift or NFT to celebrate.
- For each user, call
- Another contract or script periodically runs:
- Portability – Your birthday list is tied to your wallet, not to a specific app.
- Verifiability – Anyone can verify the birthdays you have stored by reading directly from the contract.
- Composability – Other smart contracts and dApps can build on top of this data.
- User Sovereignty – You control your on-chain data and can add/remove birthdays anytime.
This repository combines a live smart contract on Flare Coston2 with a modern front-end, providing a complete example of how to build a