{"id":39281944,"url":"https://github.com/rafat-alam/mdx-editor","last_synced_at":"2026-01-18T01:03:09.340Z","repository":{"id":313635389,"uuid":"1052070081","full_name":"rafat-alam/mdx-editor","owner":"rafat-alam","description":"MDX Editor is a modern platform for creating and organizing .mdx documents with AI-assisted writing, live preview, and folder management for dynamic, interactive content.","archived":false,"fork":false,"pushed_at":"2026-01-10T15:10:31.000Z","size":3522,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T02:06:23.571Z","etag":null,"topics":["nextjs","postgresql","redux-tookit","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://mdx-e.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafat-alam.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-07T10:44:53.000Z","updated_at":"2025-12-22T10:26:51.000Z","dependencies_parsed_at":"2025-09-07T14:30:18.385Z","dependency_job_id":"13833a51-1175-40a0-b176-153689a7f822","html_url":"https://github.com/rafat-alam/mdx-editor","commit_stats":null,"previous_names":["rafat-alam/mdx-editor"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rafat-alam/mdx-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafat-alam%2Fmdx-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafat-alam%2Fmdx-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafat-alam%2Fmdx-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafat-alam%2Fmdx-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafat-alam","download_url":"https://codeload.github.com/rafat-alam/mdx-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafat-alam%2Fmdx-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28525447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"ssl_error","status_checked_at":"2026-01-18T00:39:39.467Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["nextjs","postgresql","redux-tookit","tailwindcss","typescript"],"created_at":"2026-01-18T01:03:09.146Z","updated_at":"2026-01-18T01:03:09.256Z","avatar_url":"https://github.com/rafat-alam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MDX Editor 🚀📝\n\n**MDX Editor** is a powerful and intuitive platform built to help you **create, organize, and share knowledge** effortlessly ✨. Whether you’re writing technical documentation, learning notes, or community guides, MDX Editor gives you everything you need in one place 📚.\n\n## Why MDX Editor? ✨💡\n\n* 📁 **Structured Repositories**\n  Organize your content using folders and MDX files 📂. Treat folders as main topics and files as subtopics to maintain a clean, logical hierarchy 🧠.\n\n* ✍️ **Rich MDX Editing with Live Preview**\n  Write Markdown, JSX, and code blocks with real-time previews 👀, so you always see exactly what you’re building ⚡.\n\n* 🤖 **AI-Powered Content Generation (RAG)**\n  Generate accurate and up-to-date documentation using 🧠✨:\n\n  * 📚 Repository-wide context\n  * 🌐 Web crawling for fresh information\n  * 🔗 URL-based trusted sources\n  * ⚡ LLM-only generation for quick drafts\n\n* 🛠️ **Smart Content Refinement**\n  Improve clarity, structure, and accuracy with AI-assisted refinements ✨. Enhance specific sections without rewriting the entire document 🧹.\n\n* 🌍 **Share with the Community**\n  Publish repositories publicly to help others learn 🤝, or keep them private for personal or internal use 🔒.\n\n* 🎓 **Learn by Exploring**\n  Browse public repositories 📖, view combined topics 🧩, and get inspired by community-driven knowledge 🌟.\n\n## Built for Everyone 💡👥\n\n* 👨‍💻 Developers \u0026 engineers\n* 🎒 Students \u0026 learners\n* ✍️ Writers \u0026 educators\n* 🧑‍🤝‍🧑 Teams building internal documentation\n\n**Free to use 🆓, easy to get started 🚀, and powerful as you grow 📈**, MDX Editor transforms ideas into **well-structured, shareable documentation**—faster ⚡ and smarter 🧠.\n\n## Future Updates 🔮🛠️\n\n### v2 🌱\n\n1. Profile settings 👤\n2. Change name ✏️\n3. Change username 🆔\n4. Change email 📧\n5. Change password 🔒\n6. Middleware to Proxy 🧩\n7. OAuth SignIn / SignUp 🔑\n8. Connect RAG 🤖\n\n### v3\n\n1. Connect GPT\n\n## Project Structure 🗂️\n\n```\ndb/\n├── index.ts  (function to get _db instance)\n└── schema.ts\n\npublic/\n└── team/     (team profile pictures)\n\nsrc/\n├── app/\n│   ├── about          (page)\n│   │\n│   ├── api\n│   │   ├── ai\n│   │   │   ├── gemini                (route)\n│   │   │   └── gpt                   (route) (Comming Soon...)\n│   │   │\n│   │   ├── auth\n│   │   │   ├── [...nextauth]         (route)\n│   │   │   ├── forgot-pass           (route)\n│   │   │   └── signup                (route)\n│   │   │\n│   │   ├── edit\n│   │   │   ├── add-file              (route)\n│   │   │   ├── add-folder            (route)\n│   │   │   ├── add-repo              (route)\n│   │   │   ├── remove                (route)\n│   │   │   ├── rename                (route)\n│   │   │   ├── save                  (route)\n│   │   │   └── set-repo-vis          (route)\n│   │   │\n│   │   ├── get\n│   │   │   ├── all-public-repos      (route)\n│   │   │   └── path                  (route)\n│   │   │\n│   │   ├── rag\n│   │   │   ├── repo                  (route) (Comming Soon...)\n│   │   │   ├── url                   (route) (Comming Soon...)\n│   │   │   └── web                   (route) (Comming Soon...)\n│   │   │\n│   │   └── u/[username]              (route)\n│   │\n│   ├── editor         (page)\n│   ├── forgot-pass    (page)\n│   ├── public-repos   (page)\n│   ├── settings       (page)\n│   ├── signin         (page)\n│   └── u/[...path]    (page)\n│\n├── components\n│   ├── about\n│   ├── dashboard\n│   ├── editor\n│   ├── forgot-pass\n│   ├── home\n│   ├── nav-menu\n│   ├── public-repos\n│   ├── signin\n│   ├── signup\n│   ├── ui\n│   ├── ui2\n│   └── themeprovider\n│\n├── data/\n│   └── team_members_data.json\n│\n├── lib/\n│   └── utils.ts\n│\n├── module/\n│   ├── entities/\n│   │   ├── node.ts\n│   │   └── user.ts\n│   │\n│   ├── repo/\n│   │   ├── node_repo.ts\n│   │   └── user_repo.ts\n│   │\n│   └── services/\n│       ├── auth_service.ts\n│       ├── helper_service.ts\n│       ├── node_service.ts\n│       └── user_service.ts\n│\n├── store/              (Redux Toolkit)\n│   ├── authSlice.ts\n│   └── store.ts\n│\n└── middleware.ts       (Edge Runtime)\n\ntypes/\n└── next-auth.d.ts\n```\n\n## API Flow 🔁🧠\n\n```\nClient (UI / Fetch / Axios)\n   ↓\nMiddleware (Edge)\n   - coarse authentication gate (logged in or not)\n   - protected route allow/deny\n   - lightweight session existence check\n   ↓\nAPI Route (Controller)\n   - full authentication check (authoritative)\n   - input validation\n   - data normalization\n   ↓\nService (Business Logic)\n   - permissions (ownership, roles)\n   - workflows\n   - transactions\n   - orchestration\n   ↓\nRepository (Data Access)\n   - database queries only\n   ↓\nDatabase\n```\n\n## Local Development Setup 🧑‍💻⚙️\n\n### Clone Repository 📦\n\n```bash\ngit clone https://github.com/rafat-alam/mdx-editor.git\ncd mdx-editor\n```\n\n### Create `.env` File 🔐\n\n```env\n# Database connection string\nDATABASE_URL=\"postgresql://USER:PASSWORD@HOST:PORT/DB_NAME?sslmode=require\"\n\n# NextAuth secret key\nNEXTAUTH_SECRET=\"your_nextauth_secret_here\"\n\n# SMTP (Brevo) credentials\nBRAVO_USER=\"your_brevo_username_here\"\nBRAVO_PASS=\"your_brevo_password_here\"\n\n# Gemini API key\nGEMINI_API_KEY=\"your_gemini_api_key_here\"\n\n# Upstash (Redis API)\nUPSTASH_REDIS_REST_URL=\"https://user-redis-0000.upstash.io\"\nUPSTASH_REDIS_REST_TOKEN=\"upstash_redis_rest_token_here\"\n```\n\n### Install Dependencies 📥\n\n```bash\nnpm install\n```\n\n### Run Drizzle ORM (First Time Only) 🗄️\n\n```bash\nnpx drizzle-kit generate\nnpx drizzle-kit migrate\n```\n\n### Run Project (Development) ⚡\n\n```bash\nnpm run dev\n```\n\n### Run Project (Production) 🚀\n\n```bash\nnpm run build\nnpm run start\n```\n\n## License (MIT) 📜✅\n\n```\nMIT License\n\nCopyright (c) 2025 Rafat Alam\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafat-alam%2Fmdx-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafat-alam%2Fmdx-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafat-alam%2Fmdx-editor/lists"}