{"id":15723393,"url":"https://github.com/vishishtkapoor/medium-project","last_synced_at":"2025-04-23T07:40:52.705Z","repository":{"id":252964793,"uuid":"842046976","full_name":"vishishtkapoor/Medium-Project","owner":"vishishtkapoor","description":"Building a Medium-like blogging app from scratch. By using modern tools like React, Vite, Cloudflare Workers, TypeScript, Prisma, and PostgreSQL, you can create a robust and scalable application.","archived":false,"fork":false,"pushed_at":"2024-10-04T17:46:50.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T22:51:10.755Z","etag":null,"topics":["cloudflare-workers","full-stack","hono","jwt","prisma","reactjs","webapp"],"latest_commit_sha":null,"homepage":"https://medium-project-e6we.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/vishishtkapoor.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}},"created_at":"2024-08-13T15:03:41.000Z","updated_at":"2024-10-04T17:46:53.000Z","dependencies_parsed_at":"2024-10-24T17:47:02.600Z","dependency_job_id":"1447d7ac-f464-4b9b-9892-574b505bb9bc","html_url":"https://github.com/vishishtkapoor/Medium-Project","commit_stats":null,"previous_names":["vishishtkapoor/medium-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishishtkapoor%2FMedium-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishishtkapoor%2FMedium-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishishtkapoor%2FMedium-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishishtkapoor%2FMedium-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishishtkapoor","download_url":"https://codeload.github.com/vishishtkapoor/Medium-Project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250394295,"owners_count":21423360,"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":["cloudflare-workers","full-stack","hono","jwt","prisma","reactjs","webapp"],"created_at":"2024-10-03T22:11:29.493Z","updated_at":"2025-04-23T07:40:52.681Z","avatar_url":"https://github.com/vishishtkapoor.png","language":"TypeScript","readme":"\n# Blogging App - Medium\n\n## Frontend\n\n### React\nA powerful library for building dynamic and responsive user interfaces.\n\n### Vite\nA fast build tool that enhances development with instant hot module replacement.\n\n### Skeleton Loading\nImproves user experience by displaying a placeholder while content is loading.\n\n## Backend\n\n### Cloudflare Workers\nA serverless platform for building backend logic at the edge, ensuring low latency.\n\n### TypeScript\nA statically typed superset of JavaScript that improves code reliability and maintainability.\n\n### Prisma\nAn ORM that simplifies database interactions and includes connection pooling.\n\n### PostgreSQL\nA reliable and powerful open-source relational database.\n\n### Zod\nA schema declaration and validation library providing type inference.\n\n### JWT\nJSON Web Tokens for secure authentication, enabling stateless sessions.\n\n## Project Setup\n\n### Bootstrapping the Project\n\nVite makes it easy to create a React project.\n\n```bash\nnpm create vite@latest medium-project --template react\ncd medium-project\nnpm install\n```\n\n### Setting Up the Backend with Cloudflare Workers\n\nCloudflare Workers allow you to write serverless functions that run on Cloudflare's edge network.\n\n```bash\nnpm install -g wrangler\nwrangler init\n```\n\nConfigure your `wrangler.toml` file with your Cloudflare account details.\n\n### Configuring Prisma and PostgreSQL\n\nPrisma simplifies database management. Set up your PostgreSQL database and configure Prisma:\n\n```bash\nnpm install prisma --save-dev\nnpx prisma init\n```\n\nUpdate the `DATABASE_URL` in your `.env` file with your PostgreSQL connection string. Define your database schema in `prisma/schema.prisma` and run migrations:\n\n```bash\nnpx prisma migrate dev --name init\n```\n\n### Integrating TypeScript and Zod\n\nTypeScript enhances code reliability, and Zod complements it by providing runtime validation. Install the necessary packages:\n\n```bash\nnpm install typescript Zod\n```\n\nAdd a `tsconfig.json` file for TypeScript configuration, and use Zod to validate data structures.\n\n### Implementing Authentication with JWT\n\nJWTs provide secure authentication. Install the package:\n\n```bash\nnpm install jsonwebtoken\n```\n\nCreate utility functions for generating and verifying tokens, and set up authentication routes using Cloudflare Workers.\n\n## Deployment\n\n### Deploying Backend with Cloudflare Workers\n\nDeploy your backend code to Cloudflare Workers:\n\n```bash\nwrangler publish\n```\n\n### Deploying Frontend with Vercel\n\nDeploy your React app with Vercel:\n\n```bash\nnpm install -g vercel\nvercel\n```\n\nFollow the prompts to deploy your app.\n\n## Conclusion\n\nBuilding a Medium-like blogging app from scratch is a rewarding experience. By using modern tools like React, Vite, Cloudflare Workers, TypeScript, Prisma, and PostgreSQL, you can create a robust and scalable application.\n\nA special thanks to Harkirat for his guidance throughout this journey.\n\nCheck out the live app [here](#) and the GitHub repository [here](#). I hope this guide inspires you to build your own amazing applications!\n\nHappy coding! 🚀✨\n```\n\nYou can replace the placeholders in the links (`[here](#)`) with the actual URLs when available.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishishtkapoor%2Fmedium-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishishtkapoor%2Fmedium-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishishtkapoor%2Fmedium-project/lists"}