Coder Social home page Coder Social logo

nscloud-demo / demo-remix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from namespace-integration-demos/buildkite-demo-remix

0.0 0.0 0.0 806 KB

Demo using GitHub runners from Namespace Cloud

Home Page: https://cloud.namespace.so/docs/features/on-demand-buildkite-agents

License: MIT License

JavaScript 0.91% TypeScript 91.41% CSS 7.06% Dockerfile 0.63%

demo-remix's Introduction

Hacker News Clone Remix/React

GitHub Repo stars GitHub Followers GitHub Issues GitHub Pull Requests

This is a clone of Hacker News written in TypeScript using Remix and React.

It is intended to be an example or boilerplate to help you structure your projects using production-ready technologies.

The project implements the publicly available parts of the Hacker News site API, with some remaining functionality implemented in-memory.

Hacker News Clone Demo

Live Demo

Overview

Featuring

  • Remix (Server side rendering framework)
  • React (Declarative UI)
  • ESBuild (via Remix, sub-second production builds)
  • TypeScript (Static typing)
  • ESLint (Code checking)
  • Authentication via Cookies (plain JS)
  • Jest (Test runner)
  • Prettier (Code formatter)
  • Docker (Container builder)

Benefits

UI

  • Website works with JavaScript disabled (Remix)
  • Nested routes allow building complex UI applications that are also SSR capable (Remix)
  • Data fetching for client and server uses the same loader code (Remix)
  • Most apps can be built leveraging web fundamentals (form/anchor tag) requiring no state management library (Remix)
  • Data management is simple resulting in smaller codebase and client JS bundle sizes, approx ~30-50% smaller for this HN clone project compared to the GraphQL HN clone (Remix)
  • Declarative UI (React)
  • Minimalistic client-side UI rendering (Remix)
  • Pre-fetch page assets (Remix)
  • JS Code splitting (Remix)
  • Loading state spinners not required by default (Remix)

Server

  • Server Side rendering (Remix)
  • Universal TypeScript/JavaScript (Web standards)
  • Server can build a single JS file for optimized deployments (Remix)
  • Deployable on FaaS (Functions as a Service), edge workers or on your own NodeJS server (Remix)
  • Asset bundler (ESBuild via Remix)

Dev/Test

  • Hot module reloading (remix)
  • Snapshot testing (Jest)
  • JS/TS best practices (eslint)

Architecture overview

Hacker News clone architecture overview diagram

Remix emphasises web primitives and fundamentals. So requests are made generally using Remix's <Link>s and <Form>s which add some extra functionality on top of the regular <a> and <form> tags.

Remix routes folder correlates to route-matching UI views with layouts and endpoints for GET (loader) or all other HTTP verb methods (action). You can have endpoints with no UI and UI with no endpoints, or mixed.

Remix takes care of the build system (using ESBuild), which works incredibly quickly and is a pleasure to work with. Remix implements code-splitting, HTTP headers, asset bundling and various optimizations to make the site run fast in real-world scenarios.

Remix can run in a number of runtime environments so the architecture for your app could be widely different depending on your requirements. You could deploy it on an edge network (like Cloudflare Workers) or run it with NodeJS inside a cloud VM or VPS, for example.

How to build and start

Start with npm install.

You can build and start with file watching using npm run dev.

Or you can do a regular build and start using npm run build and npm run start.

One Command Setup & Run

You can download and run the repo with one command to rule them all:

git clone https://github.com/clintonwoo/hackernews-remix-react.git && cd hackernews-remix-react && npm install && npm run build && npm run dev

Contributing

File an issue for ideas, conversation or feedback. Pull requests are welcome.

Community

After you ★Star this project, follow @ClintonDAnnolfo on Twitter.

demo-remix's People

Contributors

gmichelo avatar clintonwoo avatar nichtverstehen 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.