Clone of a certain microblogging site. Based on Remix Indie Stack.

Overview

Microblog

No guarantees that any of this works. I'm new at this and experimenting. Built on top of Remix's Indie Stack. Database query organisation might be a hot mess. Uses Nodemailer to send email confirmation codes.

👉 Microblog Staging Demo

Screenshot 2022-04-17 at 13 11 57

Features

Not all "Popular Microblogging Site" features are replicated, but here's what currently should work:

  • Creating accounts and sending verification emails
  • Deleting accounts (and all their posts)
  • Creating posts
  • Deleting posts (and all it's likes)
  • Liking/unliking posts
  • Reposting/unreposting posts
  • Following/unfollowing users
  • Verification badges for users
  • Replying to posts
  • Seeing replies to a post
  • Seeing list of people who liked a post
  • Seeing list of people who reposted a post
  • Seeing a list of users followings
  • Seeing a list of users followers
  • Updating profile info (name, bio, website, avatar url, cover url, etc)
  • Automatic dark/light mode support
  • Somewhat reasonable responsiveness
  • Most if not all features work with JavaScript disabled

Development

  • Initial setup:

    npm install
  • Start dev server:

    npm run dev
    • Delete and reset database:
    rm prisma/data.db
    npx prisma db push
    npx prisma db seed

This starts your app in development mode, rebuilding assets on file changes.

The database seed script creates a few new users with some data you can use to get started:

Users:

ENV

Create .env file with

DATABASE_URL="file:./data.db?connection_limit=1"
SESSION_SECRET="some-random-secret"
GMAIL_EMAIL="[email protected]"
GMAIL_PASSWORD="your-gmail-password"

Deployment

Two GitHub Actions handle automatically deploying your app to production and staging environments.

Prior to your first deployment, you'll need to do a few things:

  • Install Fly

  • Sign up and log in to Fly

    fly auth signup

    Note: If you have more than one Fly account, ensure that you are signed into the same account in the Fly CLI as you are in the browser. In your terminal, run fly auth whoami and ensure the email matches the Fly account signed into the browser.

  • Create two apps on Fly, one for staging and one for production:

    fly create microblog
    fly create microblog-staging
    • Initialize Git.
    git init
  • Create a new GitHub Repository, and then add it as the remote for your project. Do not push your app yet!

    git remote add origin <ORIGIN_URL>
  • Add a FLY_API_TOKEN to your GitHub repo. To do this, go to your user settings on Fly and create a new token, then add it to your repo secrets with the name FLY_API_TOKEN.

  • Add a SESSION_SECRET to your fly app secrets, to do this you can run the following commands:

    fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app microblog
    fly secrets set SESSION_SECRET=$(openssl rand -hex 32) --app microblog-staging

    If you don't have openssl installed, you can also use 1password to generate a random secret, just replace $(openssl rand -hex 32) with the generated secret.

  • Create a persistent volume for the sqlite database for both your staging and production environments. Run the following:

    fly volumes create data --size 1 --app microblog
    fly volumes create data --size 1 --app microblog-staging

Now that everything is set up you can commit and push your changes to your repo. Every commit to your main branch will trigger a deployment to your production environment, and every commit to your dev branch will trigger a deployment to your staging environment.

Connecting to your database

The sqlite database lives at /data/sqlite.db in your deployed application. You can connect to the live database by running fly ssh console -C database-cli.

GitHub Actions

We use GitHub Actions for continuous integration and deployment. Anything that gets into the main branch will be deployed to production after running tests/build/etc. Anything in the dev branch will be deployed to staging.

Linting

This project uses ESLint for linting. That is configured in .eslintrc.js.

Formatting

It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save. There's also a npm run format script you can run to format all files in the project.

You might also like...

Simple rate-limiter NPM Module used for blocking IPs that exceeds certain number of requests per second in a specific time frame.

API Rate Limiter Zero-Dependencies Simple rate-limiter NPM Module used for blocking IPs that exceeds certain number of requests per second in a specif

Oct 7, 2022

The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Dec 22, 2022

Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this workshop, we'll look at some more advanced use cases when building Remix applications.

💿 Advanced Remix Workshop Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this

Dec 9, 2022

Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. Get a jumpstart on Remix with this workshop.

💿 Remix Fundamentals Build Better websites with Remix Remix enables you to build fantastic user experiences for the web and feel happy with the code

Dec 25, 2022

simple-remix-blog is a blog template built using Remix and TailwindCSS. Create your own blog in just a few minutes!

simple-remix-blog is a blog template built using Remix and TailwindCSS. Create your own blog in just a few minutes!

simple-remix-blog is a blog template built using remix.run and TailwindCSS. It supports markdown and MDX for the blog posts. You can clone it and star

Dec 8, 2022

🐦 A Twitter clone with Remix and Kontenbase

Writter A Twitter clone with Remix and Kontenbase. Styled with Chakra UI. Features What's implemented Landing page Authentication/Authorization Sign u

Jun 26, 2022

(Developing) Twitter Clone made with Remix, EdgeDB & UnoCSS.

Twitter Clone Twitter clone made with Remix, EdgeDB & UnoCSS. Demo: twitter-clone.poke.dev Features Signup/Login (With GitHub OAuth) Create tweets Fol

Jan 3, 2023

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

May 20, 2022
Owner
Kuldar Kalvik
Recovering maker of web things.
Kuldar Kalvik
Uncensorable, immutable microblogging platform that is completely decentralized and does not rely on any centralized systems.

Zooko Truly decentralized, immutable and uncensorable microblogging Zooko is a working-example, proof-of-concept proving that you can have a decentral

Publius Federalist 152 Apr 20, 2022
Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Ilango 56 Dec 25, 2022
This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

WMouton 2 Dec 25, 2021
This shows NFT tracking in the certain wallet using express back-end.

nft-tracking-for-solana-wallet Express backend for NFT tracking in the certain wallet. Webhook for scraping secondary marketplace information for part

null 10 Nov 16, 2022
To keep online organized data and be able to add listeners in certain paths by socket.io and http clients

The purpose of this project is to create a state machine server to keep organized data and be able to add listeners with socket.io in specific paths and in addition to providing a possible form of messages between socket.io clients.

Manga 3 Mar 19, 2022
🪨 A simple obsidian plugin that links all modified files meeting certain criteria to a daily note

Obsidian List Modified This plugin lists all modified files meeting certain criteria to a daily note. Why? As of now, dataview queries cannot be "froz

Francis Kafieh 51 Dec 7, 2022
An open-source server software for a certain anime game.

Open-Shen An open-source server software for a certain anime gaem. Based off the leaked Pancake and closed-source Bridge servers. You can find the Ope

Magix 68 Dec 10, 2022
This application lists the scores of players of a certain game (determined by the user), in this app the Leaderboard REST API is used, where the participants and their scores are registered.

Leaderboard this application lists the scores of players of a certain game (determined by the user), in this app the Leaderboard REST API is used, whe

Gonzalo Medina 5 Jul 29, 2022
A JavaScript Library that allows you to execute function when a certain element gets added to the document

wait-for-it.js A JavaScript Library that allows you to execute function when a certain element gets added to the document Getting Started If you want

Muhammad Tayyab Sheikh 12 Apr 26, 2022