Skip to content

giilbert/chirp-2

Repository files navigation

Chirp (2.0)

Next JS React TypeScript Prisma TailwindCSS

From breaking news to shitposts, get the latest information from people all over the world with this next-generation blazingly-fast social media app!

Features

  • Create, edit, and delete chirps (posts)
  • Like and unlike chirps
  • User authentication and profiles
  • Follow and unfollow users
  • View posts from followed users
  • Search for users and posts
  • Chirp Purple

The Stack

  • Next.js - Fullstack React framework 🚀💪
  • Prisma - Database without the tears 😭
  • tRPC - Typescript RPC framework 🦉
  • Tailwind CSS - CSS framework 🎨
  • MySQL - Database 🗃️

Hosted on

  • Vercel - Frontend hosting ▲ (they're awesome for sponsoring TechCodes)
  • PlanetScale - Vitess MySQL Database hosting 🗄️ (they're awesome too)

Developing

Overview of the Folder Structure

Extending https://create.t3.gg/en/folder-structure src/components/[division]/[component-name].tsx - Contains reusable UI code for chirps, users, layout, or general UI stuff. src/lib/** - Contains reusable code appropriate for other projects.

Running The Easy Way

  1. Load the devcontainer defined in .devcontainer/devcontainer.json
  2. Create a .env.local file with the appropriate environment variables (see .env.example)
  3. Run the development task in VSCode

Running The Harder Way

Required tools (these are my versions, the app may or may not work on other versions):

  • node v19.9.0
  • yarn 1.22.19
  • docker 20.10.24

Steps:

  1. Create a .env.local file with the appropriate environment variables (see .env.example)
  2. Install dependencies: yarn
  3. Start MySQL service: docker compose up
  4. Set up the database: yarn prisma db push
  5. Start the app: yarn dev
  6. If everything went right, you should be able to access the app at http://localhost:3000

License

Distributed under the MIT License. See LICENSE for more information.