Giter Site home page Giter Site logo

chulev / flocker Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.15 MB

A Twitter clone built from scratch with Next.js and TypeScript

Home Page: https://flocker.top

License: MIT License

JavaScript 0.42% CSS 0.05% TypeScript 99.36% Dockerfile 0.16%
authjs kysely nextjs postgresql redis resend tailwindcss typescript uuidv7 zod

flocker's Introduction

Flocker

A Twitter clone built from scratch with Next.js + TypeScript.
Deployed on flocker.top

Flocker home light theme Flocker home dark theme Flocker profile page Flocker home mobile

Features

  • Authentication: Users can sign up, log in, and log out securely using credentials (username/password) or Google sign-in. Forgot password and email verification flows are also implemented for enhanced security. Emails are sent using Resend. ๐Ÿ›ก๏ธ๐Ÿ“ง
  • Tweeting and Replying with Images: Users can create new tweets and replies, including the option to upload an image. Images are uploaded through Cloudinary for seamless integration. ๐Ÿ–ผ๏ธ
  • Interactions: Users can also retweet, like, and bookmark tweets. Likes can also be applied to replies. Additionally, users can follow other users to stay updated with their tweets. โค๏ธ๐Ÿ”๐Ÿ”–
  • Hashtags: Tweets can contain hashtags, which allow users to categorize and discover content easily by adding relevant keywords or phrases to their posts. Users can click on a hashtag to view all tweets containing it. ๐Ÿ”–
  • Personalized Profile Page: Every user has a personalized profile page with the option to add an avatar, cover image, and a bio section. โœ…
  • Real-time Updates: Real-time updates are achieved through Server-Sent Events (SSE) and Redis Publish/Subscribe, providing instant notifications for interactions such as tweeting, retweeting, liking, and following. ๐Ÿ”„โšก
  • Form Validation: Zod is used for validating form input both client-side and server-side, providing robust validation for improved user experience and security. โœ…
  • Rate Limiting: Interactions are rate-limited, ensuring that users cannot excessively perform actions like tweeting, retweeting, or liking within a short period of time. ๐Ÿ•’
  • Infinite Scroll: All feeds feature infinite scrolling, implemented with cursor-based pagination, providing a seamless browsing experience for users as they explore tweets, replies, or users. ๐Ÿ”„๐Ÿ“œ
  • Responsive design: Built with Tailwind CSS, the application is responsive and works well on various screen sizes.
  • Light and Dark Theme: Users can switch between light and dark themes according to their preferences for a personalized user experience. ๐ŸŒž๐ŸŒš
  • Dockerized Development + Hot Reload: The project is "dockerized" for local development, with Redis and Postgres instances included, ensuring consistency across different environments. Migrations and seeds are applied on startup. ๐Ÿณ
  • Configured for Unit Testing: Bun test runner and React Testing Library are used for writing unit tests (example tests included).
  • Sensible Linting and Formatting: The project comes pre-configured with sensible ESLint and Prettier defaults out of the box, ensuring code quality and consistency. โœจ๐Ÿงน

Technologies

  • TypeScript: A statically typed superset of JavaScript.
  • Next.js + App Router: A React framework for server-side rendering, static site generation, and more.
  • Auth.js: A library for user authentication.
  • Tailwind CSS: A utility-first CSS framework for quickly building custom designs.
  • Kysely: A TypeScript-first SQL query builder.
  • Resend: A lightweight HTTP client for making API requests and sending emails.
  • Redis: An in-memory data structure store used for caching real-time updates.
  • Postgres: A powerful, open-source relational database system.
  • Docker: A platform for developing, shipping, and running applications using containerization.
  • Cloudinary: A cloud-based image and video management service for uploading, storing, and manipulating media assets.
  • SSE (Server-Sent Events): A standard allowing servers to push updates to web clients over HTTP.
  • Zod: A TypeScript-first schema declaration and validation library.
  • Bun: A fast all-in-one JavaScript runtime. Bun is used for installing dependencies, running unit tests, and production builds.
  • React Testing Library: A light-weight solution for testing React components and hooks.
  • GitHub Actions: GitHub's CI/CD solution.
  • Render: Production build is deployed to Render.com via a manually triggered GitHub Workflow.

Getting Started

Prerequisites: Docker

To get started with this project, follow these steps:

  1. Clone the repository:
git clone https://github.com/chulev/flocker.git
  1. Navigate to the project directory:
cd flocker
  1. Create a .env.local file based on the .env.example file.

  2. Start the local development environment:

docker-compose up -d
  1. Open your browser and navigate to http://localhost:3000 to view the application.

  2. Use your favorite editor to make changes and see them apply instantly!

License

This project is licensed under the MIT License. ๐Ÿ“๐ŸŽ‰

flocker's People

Contributors

chulev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.