Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

blog app for practice

NotificationsYou must be signed in to change notification settings

AnmolDotX/writy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a Medium-like but private blog application developed to practice and showcase my CRUD application capabilities. The project uses the latest tech stack, including Next.js 14 for the frontend, Hono.js for the backend, Cloudflare for deployment and edge functions, Prisma with PostgreSQL for the database, and Vercel for frontend deployment. For styling, I utilized ShadCN and Tailwind CSS, while Zod and TypeScript were used for type validation.

Features

  • CRUD Operations: Create, Read, Update, and Delete blog posts.
  • User Authentication: Secure login and registration system.
  • Type Validation: Consistent type definitions across frontend and backend using Zod and TypeScript.

Tech Stack

  • Frontend: Next.js 14, ShadCN, Tailwind CSS
  • Backend: Hono.js, Cloudflare
  • Database: Prisma, PostgreSQL
  • Deployment: Vercel (Frontend), Cloudflare (Backend)
  • Type Validation: Zod, TypeScript

Future Plans

I plan to expand this application by using a monorepo structure and containers for better code management and scalability.

Screenshots

Homepage

Installation and Setup

Prerequisites

  • Node.js (v20 or later)
  • PostgreSQL

Backend Setup

  1. Fork and then Clone the repository:

     git clone https://github.com/AnmolDotX/writy.gitcd writy
  2. Install dependencies: frontend & backend

    cd backendnpm installcd frontendnpm install
  3. Set up the database:

    • Create a PostgreSQL and a Prisma accelerate database URL and update theDATABASE_URL with prisma accelerate andDIRECT_URL with postgresql url, in the.env file of backend.
    • In the frontend.env just paste the backend server url examplehttp://localhost:8787
  4. Run database migrations:

    npx prisma migrate dev --name name_of_migrationnpx prisma generate --no-engine
  5. Start the backend server:

    npm run dev

Type Validation

This project follows an older approach of creating a common Zod module for both frontend and backend. This approach ensures that type validation for forms and APIs is consistent across the application.

Contributing or Feature request

If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are welcome. Also if you want any feature kindly request in theissues tab of this project


[8]ページ先頭

©2009-2025 Movatter.jp