{"id":51080600,"url":"https://github.com/thepratikguptaa/draftly","last_synced_at":"2026-06-23T17:32:39.887Z","repository":{"id":350830854,"uuid":"1205902109","full_name":"thepratikguptaa/draftly","owner":"thepratikguptaa","description":"AI-powered microblogging platform. Write posts, refactor them with AI, like, comment, search, upload images, and go premium for advanced features.","archived":false,"fork":false,"pushed_at":"2026-04-12T09:41:28.000Z","size":246,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T11:17:38.087Z","etag":null,"topics":["imagekit","mongodb-atlas","nextjs","payment-integration","razorpay-payment-gateway"],"latest_commit_sha":null,"homepage":"https://the-draftly.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thepratikguptaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-09T11:47:19.000Z","updated_at":"2026-04-12T09:41:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thepratikguptaa/draftly","commit_stats":null,"previous_names":["thepratikguptaa/draftly"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/thepratikguptaa/draftly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepratikguptaa%2Fdraftly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepratikguptaa%2Fdraftly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepratikguptaa%2Fdraftly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepratikguptaa%2Fdraftly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thepratikguptaa","download_url":"https://codeload.github.com/thepratikguptaa/draftly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepratikguptaa%2Fdraftly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34700906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["imagekit","mongodb-atlas","nextjs","payment-integration","razorpay-payment-gateway"],"created_at":"2026-06-23T17:32:38.360Z","updated_at":"2026-06-23T17:32:39.878Z","avatar_url":"https://github.com/thepratikguptaa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Draftly\n\nAI-powered microblogging platform. Write posts, refactor them with AI, like, comment, search, upload images, and go premium for advanced features.\n\n## Tech Stack\n\nNext.js 16 (App Router) | Tailwind CSS | shadcn/ui | MongoDB | Auth.js | Azure OpenAI | Razorpay | ImageKit\n\n## Features\n\n- **Authentication** - Google OAuth + email/password signup \u0026 login\n- **AI Refactor** - Rewrite posts in 5 styles: basic, professional, casual, funny, concise\n- **Like/Heart** - Like posts with optimistic UI, like counts on every post\n- **Comments** - Inline threaded comments on every post, delete your own\n- **Search** - Search posts by keyword in real time\n- **Image Upload** - Attach images to posts via ImageKit (premium)\n- **Premium Upgrade** - Pay via Razorpay to unlock unlimited refactors, all styles, and image uploads\n- **My Posts** - View, edit, and delete your own posts\n- **Dark/Light Mode** - Theme toggle with persistence\n- **Two-Column Layout** - Sidebar with profile card and compose box, feed on the right (responsive, collapses on mobile)\n\n## Database\n\n**MongoDB** with four collections:\n\n| Collection | Fields |\n|---|---|\n| `users` | name, email, password (hashed), image, isPremium, dailyRefactorCount, lastRefactorDate |\n| `posts` | userId, text, imageUrl, createdAt |\n| `comments` | postId, userId, text, createdAt |\n| `likes` | postId, userId, createdAt (unique index on postId + userId) |\n\n## API Routes\n\n| Method | Route | Description |\n|---|---|---|\n| POST | `/api/signup` | Create account with email/password |\n| POST / GET | `/api/post` | Create post / list all posts (with like \u0026 comment counts, search via `?q=`) |\n| PUT / DELETE | `/api/post/[id]` | Edit / delete own post |\n| GET | `/api/post/me` | List current user's posts |\n| POST | `/api/like` | Toggle like/unlike on a post |\n| POST / GET | `/api/comment` | Add comment / list comments for a post |\n| DELETE | `/api/comment/[id]` | Delete own comment |\n| POST | `/api/refactor` | AI-powered text refactoring |\n| POST | `/api/upload-image` | Upload image via ImageKit (premium only) |\n| POST | `/api/checkout` | Create Razorpay order |\n| POST | `/api/verify-payment` | Verify Razorpay payment signature |\n| GET | `/api/user` | Get current user info |\n\n## Free vs Premium\n\n| Feature | Free | Premium |\n|---|---|---|\n| AI Refactor | 5/day, basic style only | Unlimited, all 5 styles |\n| Image Upload | Not available | Up to 2MB per image |\n| Likes \u0026 Comments | Yes | Yes |\n| Search | Yes | Yes |\n\n## Getting Started\n\n```bash\nnpm install\ncp .env.example .env.local   # fill in your credentials\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\n### Environment Variables\n\n| Variable | Description |\n|---|---|\n| `MONGODB_URI` | MongoDB connection string |\n| `AUTH_SECRET` | Auth.js secret (`npx auth secret`) |\n| `AUTH_GOOGLE_ID` | Google OAuth client ID |\n| `AUTH_GOOGLE_SECRET` | Google OAuth client secret |\n| `AZURE_OPENAI_ENDPOINT` | Azure OpenAI endpoint |\n| `AZURE_OPENAI_API_KEY` | Azure OpenAI API key |\n| `RAZORPAY_KEY_ID` | Razorpay key ID |\n| `RAZORPAY_KEY_SECRET` | Razorpay key secret |\n| `IMAGEKIT_PUBLIC_KEY` | ImageKit public key |\n| `IMAGEKIT_PRIVATE_KEY` | ImageKit private key |\n| `IMAGEKIT_URL_ENDPOINT` | ImageKit URL endpoint |\n\n## Created by\n\n[Pratik Gupta](https://pratik-gupta-portfolio.vercel.app/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepratikguptaa%2Fdraftly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepratikguptaa%2Fdraftly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepratikguptaa%2Fdraftly/lists"}