https://github.com/muneerahmed03/mindr-app
Save and retrieve any thought, idea or memory just by texting.
https://github.com/muneerahmed03/mindr-app
ai authjs cloudflare-pages hono nextjs supabase-js typescript workers-ai
Last synced: 7 months ago
JSON representation
Save and retrieve any thought, idea or memory just by texting.
- Host: GitHub
- URL: https://github.com/muneerahmed03/mindr-app
- Owner: MuneerAhmed03
- Created: 2024-08-31T07:28:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-11T12:24:02.000Z (12 months ago)
- Last Synced: 2025-03-15T12:14:57.756Z (7 months ago)
- Topics: ai, authjs, cloudflare-pages, hono, nextjs, supabase-js, typescript, workers-ai
- Language: TypeScript
- Homepage: https://mindr.live
- Size: 647 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [MindR Web Application](https://mindr.live/)

MindR Web App is a companion application to the MindR Telegram bot. It provides a user-friendly interface for managing your stored memories. With this web app, users can easily onboard, view their stored memories, and delete them as needed.
## Features
- User authentication (including Telegram login)
- Onboarding process for new users
- View and manage stored memories
- Delete unwanted memories
- Seamless integration with the MindR Telegram bot## Tech Stack
- **Framework**: Next.js
- **Deployment**: Cloudflare Pages
- **Authentication**: Auth.js v5
- **Database**: Supabase PostgreSQL (shared with Telegram bot)## Setup Instructions
### Prerequisites
- Node.js and npm installed on your system
- A [Cloudflare](https://www.cloudflare.com/) account
- A [Supabase](https://supabase.com/) account (same as used for the Telegram bot)
- OAuth credentials (e.g., Google, GitHub) for Auth.js
- Your Telegram Bot Token### Steps
1. Clone the repository:
```
git clone https://github.com/yourusername/mindr-webapp.git
cd mindr-webapp
```2. Install dependencies:
```
npm install
```3. Set up environment variables:
Create a `.env.local` file in the root directory and add the following:```
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
TELEGRAM_BOT_TOKEN=your_telegram_bot_token```
4. Set up Auth.js:
- Configure Auth.js in `pages/api/auth/[...nextauth].js`
- Set up the necessary OAuth providers5. Configure Telegram Login:
- Go to [@BotFather](https://t.me/BotFather) on Telegram
- Send the command `/setdomain`
- Select your bot
- Enter your web app's domain (e.g., `yourapp.pages.dev` if using Cloudflare Pages)
- BotFather will confirm that the domain has been set for your bot6. Setup Telegram Login to your Auth.js for custom configuration (optional):
Update your `pages/api/auth/[...nextauth].js` file.7. Run the development server:
```
npm run dev
```8. Build the project:
```
npm run build
```9. Deploy to Cloudflare Pages:
- Connect your GitHub repository to Cloudflare Pages
- Set up the build configuration:
- Build command: `npm run build`
- Build output directory: `.next`
- Add your environment variables in the Cloudflare Pages dashboard## Usage
1. Visit the deployed web app URL
2. Sign in using your preferred method (including Telegram)
3. Complete the onboarding process if you're a new user
4. View your stored memories from the dashboard
5. Delete any unwanted memories## Integration with Telegram Bot
The web app shares the same Supabase database as the Telegram bot. This allows for seamless integration between the two platforms. Memories stored via the Telegram bot will be visible in the web app, and vice versa. Users can log in with their Telegram account, ensuring a consistent experience across both platforms.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.