{"id":24334645,"url":"https://github.com/abidalwassie/notesap","last_synced_at":"2025-04-14T15:21:55.775Z","repository":{"id":272639556,"uuid":"917273854","full_name":"AbidAlWassie/notesap","owner":"AbidAlWassie","description":"📒Multi-tenant note taking app built with Next.js v15 and libSQL","archived":false,"fork":false,"pushed_at":"2025-02-10T12:48:45.000Z","size":574,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T15:21:49.883Z","etag":null,"topics":["libsql","multi-tenant","next-auth","nextjs","oauth2","prisma-orm","radix-ui","react","shadcn-ui","tailwindcss","turso","typescript"],"latest_commit_sha":null,"homepage":"https://notesap-beta.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbidAlWassie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-15T17:21:41.000Z","updated_at":"2025-03-06T02:56:24.000Z","dependencies_parsed_at":"2025-01-15T20:03:09.935Z","dependency_job_id":"f3a18626-c00e-4cd0-bf25-73ab95d1749f","html_url":"https://github.com/AbidAlWassie/notesap","commit_stats":null,"previous_names":["abidalwassie/notesap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidAlWassie%2Fnotesap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidAlWassie%2Fnotesap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidAlWassie%2Fnotesap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidAlWassie%2Fnotesap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbidAlWassie","download_url":"https://codeload.github.com/AbidAlWassie/notesap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904626,"owners_count":21180836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libsql","multi-tenant","next-auth","nextjs","oauth2","prisma-orm","radix-ui","react","shadcn-ui","tailwindcss","turso","typescript"],"created_at":"2025-01-18T04:17:34.843Z","updated_at":"2025-04-14T15:21:55.683Z","avatar_url":"https://github.com/AbidAlWassie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Tenant Note-Taking App\n\nThis is a multi-tenant note-taking application built with **Next.js v15**, **libSQL**, **Prisma**, and **Next-Auth V5**. The app supports multiple users (tenants), each with its own set of notes, users, and workspaces, allowing seamless collaboration and efficient note management.\n\nDeployed to vercel here: [Live Demo](https://notesap-beta.vercel.app)\n\n## Features\n\n- **Multi-Tenant Architecture**: Supports multiple users, where each user can manage its own set of notes.\n- **Authentication with Next-Auth**: Secure login with social authentication providers such as Google, GitHub, and Discord.\n- **Real-Time Sync**: Notes are synced in real-time across users' devices, enabling collaborative note-taking.\n- **Text Editor**: Users can create and edit notes with rich text formatting using **Tiptap**.\n- **Custom UI**: TailwindCSS combined with **Shadcn** components for a aesthetic, responsive design.\n- **Scalable Database**: User auth and other data is managed using **PostgreSQL** and notes are managed using **libSQL**, providing a scalable solution for multi-tenant applications.\n- **Mobile Responsive**: Fully optimized for mobile, tablet, and desktop devices.\n\n## Tech Stack\n\n- **Next.js** v15\n- **Next-Auth** V5 for authentication\n- **libSQL** for multi-tenant database management\n- **Prisma** ORM for database interactions\n- **PostgreSQL** for all user auth and interaction\n- **Tiptap** for the rich text editor\n- **Shadcn** for UI components\n- **TailwindCSS** for styling\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed on your machine:\n\n- **Node.js** (v18 or later)\n- **pnpm** (recommended for package management)\n- **libSQL** for notes\n\n### Installation\n\n1. **Fork** and then **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/yourusername/notesap.git\n   cd notesap\n   ```\n\n2. Install the dependencies:\n\n   ```bash\n   pnpm install\n   ```\n\n3. Set up environment variables:\n\n   Create a `.env` file at the root of your project and add the following environment variables:\n\n   ```bash\n   NEXT_PUBLIC_CRUD_API_KEY=YOUR_CRUD_API_KEY\n   NEXT_PUBLIC_API_URL=YOUR_API_URL\n\n   GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID\n   GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET\n\n   GITHUB_CLIENT_ID=YOUR_GITHUB_CLIENT_ID\n   GITHUB_CLIENT_SECRET=YOUR_GITHUB_CLIENT_SECRET\n\n   DISCORD_CLIENT_ID=YOUR_DISCORD_CLIENT_ID\n   DISCORD_CLIENT_SECRET=YOUR_DISCORD_CLIENT_SECRET\n\n   NEXT_PRIVATE_DEBUG_CACHE=YOUR_DEBUG_CACHE_KEY\n\n   DATABASE_URL=YOUR_DATABASE_URL\n   TURSO_DATABASE_URL=YOUR_TURSO_DATABASE_URL\n   TURSO_AUTH_TOKEN=YOUR_TURSO_AUTH_TOKEN\n   TURSO_API_TOKEN=YOUR_TURSO_API_TOKEN\n   TURSO_ORG_ID=YOUR_TURSO_ORG_ID\n\n   NEXTAUTH_SECRET=YOUR_NEXTAUTH_SECRET\n   ```\n\n   - Generate the `NEXT_PUBLIC_CRUD_API_KEY` using `openssl rand -hex 32` or `openssl rand -base64 32`.\n   - Set `DATABASE_URL` and `TURSO_DATABASE_URL` based on your database provider (libSQL or others).\n\n### Development\n\n1. Start the development server:\n\n   ```bash\n   pnpm dev\n   ```\n\n2. Open `http://localhost:3000` in your browser to access the app.\n\n### Testing Commands\n\n1. To destroy the databases with \"user-[id]\" using turso cli run:\n\n   ```bash\n   turso db list | grep '^user-' | awk '{print $1}' | xargs -I {} turso db destroy {} -y\n   ```\n\n### Building for Production\n\n1. Build the application for production:\n\n   ```bash\n   pnpm build\n   ```\n\n2. Start the production server:\n\n   ```bash\n   pnpm start\n   ```\n\n## Deployment\n\nYou can deploy this app to platforms like **Vercel**, **Netlify**, or any other service that supports Next.js deployments.\n\n### Deployment to Vercel\n\n1. Push your changes to your GitHub repository.\n2. Connect the repository to **Vercel**. Vercel will automatically detect the project as a Next.js app.\n3. Add the necessary environment variables in the Vercel dashboard.\n4. Finally deploy.\n\n## Learn More\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [Next-Auth Documentation](https://next-auth.js.org/)\n- [Prisma Documentation](https://www.prisma.io/nextjs)\n- [Shadcn UI Documentation](https://ui.shadcn.com/docs/installation/next)\n- [TailwindCSS Documentation](https://tailwindcss.com/docs/guides/nextjs)\n- [Turso/libSQL Documentation](https://turso.tech/libsql)\n\n## Contributing\n\nWe welcome contributions! To contribute to the project:\n\n1. Fork the repository.\n2. Create a new branch for your changes.\n3. Submit a pull request to the main repository.\n\n## License\n\nThis project is licensed under the [Creative Commons Legal Code](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabidalwassie%2Fnotesap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabidalwassie%2Fnotesap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabidalwassie%2Fnotesap/lists"}