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.

Overview

💿 Remix Fundamentals

Build Better websites with Remix

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.


Build Status GPL 3.0 License Code of Conduct

Prerequisites

System Requirements

  • git v2.13 or greater
  • NodeJS 14 || 16 || 18
  • npm v8 or greater

All of these must be available in your PATH. To verify things are set up properly, you can run this:

git --version
node --version
npm --version

If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.

Setup

Follow these steps to get this set up:

git clone https://github.com/FrontendMasters/remix-fundamentals.git
cd remix-fundamentals
npm run setup

If you experience errors here, please open an issue with as many details as you can offer.

Exercises

You'll find all the exercises in the exercises directory. The finished version of each exercise is in the final directory. Each directory is a completely contained Remix app.

The purpose of the exercise is not for you to work through all the material. It's intended to get your brain thinking about the right questions to ask me as I walk through the material.

Running each app

Each directory in the final and exercises directories is a Remix app. The easiest way to run these without having to cd into each directory is to use the dev.js script in the root of this repository:

# to run the first exercise app:
node dev exercise/01

# This runs the first exercise too:
node dev 1

# or to run the final version of the 2nd exercise
node dev final/02
# this runs the 1st extra credit of the final version of the 2nd exercise
node dev final2.1

# this will just ask you which one you want to run
node dev

Each will run on a unique port so you can run multiple apps at once.

Unfortunately, due to the nature of this workshop, ⌘+P isn't very useful (because there are a LOT of duplicate files). If you'd prefer, you can open each exercise in its own editor. Or just make sure to prefix your searches with "exercise/03" (for example) so you're searching in the right app.

Instructions

For each exercise, follow the instructions in the README.md file of the exercise directory to learn what the objectives are.

You can us the diff.js script to be shown the differences between what's in any of the apps. For example:

# to be shown the differences between the first exercise and the final version:
node diff exercise/01 final/01

# We've got some sensible defaults in place so you can get the same diff as above with:
node diff 1

# And for comparing yourself to extra credits, you can run:
node diff exercise/02 final/02.2

# this will just ask you which ones you want to diff
node diff

This can be handy for you to run when you think you're done but things aren't quite working as you expect.

Sometimes there are changes that happen outside of the tutorial because they're unrelated to Remix but they can be handy to know about (like when we're getting the database ready for auth), so the diff command can help with that:

# To be shown the changes that happened to prepare for the exercise:
node diff final/04 exercise/05

NOTE: Unfortunately, there's no way to exclude some files from the diff we're doing, so we limit the diff to only the app directory (where almost all of your code changes happen). You'll need to ignore any changes to styles/tailwind.css however. That's a generated file. Sorry about that.

Workshop Feedback

Each exercise has an Elaboration and Feedback link. Please fill that out after the exercise and instruction.

At the end of the workshop, please go to this URL to give overall feedback. Thank you! https://kcd.im/rmx-workshop-ws-feedback

Comments
  • node dev doesn't work on Windows

    node dev doesn't work on Windows

    Due to path outputting \\ instead of / for paths on Windows this breaks currently, need to account for it in relativePath and fullPath.

    I've just temp worked around it by adding a replace on the end of each .replace('\\', '/') but there's probably a cleaner way.

    opened by AndyCormack 6
  • Not able to run npm run setup

    Not able to run npm run setup

    npm ERR! Workspaces not supported for global packages

    image

    0 verbose cli [ 0 verbose cli 'C:\Program Files\nodejs\node.exe', 0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'prefix', 0 verbose cli '-g' 0 verbose cli ] 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms 6 timing config:load:builtin Completed in 4ms 7 timing config:load:cli Completed in 3ms 8 timing config:load:env Completed in 1ms 9 info found workspace root at C:\Users\venky\Documents\GitHub\remix-fundamentals 10 timing config:load:project Completed in 30ms 11 timing config:load:file:C:\Users\venky.npmrc Completed in 1ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Users\venky\AppData\Roaming\npm\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 1ms 16 timing config:load:credentials Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 44ms 19 timing npm:load:configload Completed in 44ms 20 timing npm:load:setTitle Completed in 1ms 21 timing config:load:flatten Completed in 3ms 22 timing npm:load:display Completed in 4ms 23 verbose logfile C:\Users\venky\AppData\Local\npm-cache_logs\2022-08-02T14_57_01_852Z-debug-0.log 24 timing npm:load:logFile Completed in 5ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 0ms 27 timing npm:load Completed in 55ms 28 verbose stack Error: Workspaces not supported for global packages 28 verbose stack at Npm.exec (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:139:15) 28 verbose stack at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli.js:66:5) 29 verbose cwd C:\Users\venky\Documents\GitHub\remix-fundamentals\exercise\09-env-vars 30 verbose Windows_NT 10.0.22000 31 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "prefix" "-g" 32 verbose node v16.14.2 33 verbose npm v8.5.0 34 error Workspaces not supported for global packages 35 verbose exit 1 36 timing npm Completed in 272ms 37 verbose unfinished npm timer command:prefix 1659452222119 38 verbose code 1 39 error A complete log of this run can be found in: 39 error C:\Users\venky\AppData\Local\npm-cache_logs\2022-08-02T14_57_01_852Z-debug-0.log

    image

    this keeps happening in a loop

    opened by technologic808 5
  • Running node dev setup is leading to infinite loop

    Running node dev setup is leading to infinite loop

    Screenshot 2022-08-02 at 10 31 31 PM

    🏎 npm run build in /Users/harshithvenkatesh/Documents/Projects/Remix-BootCamp-FrontEnd-Masters/remix-fundamentals-bootcamp/final/05-mutations

    build run-s build:*

    build:css npm run generate:css -- --minify

    generate:css tailwindcss -o ./app/styles/tailwind.css "--minify"

    Done in 146ms.

    opened by harshith-venkatesh 4
  • Application Error When adding <Outlet />

    Application Error When adding

    Getting an application error when adding the Outlet /> component.

    this is in exercise 4

    when doing node diff it looks like everything is correct

    posting this here in case anybody knows why this is happening

    Application Error
    Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
        at renderNodeDestructiveImpl (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6183:11)
        at renderNodeDestructive (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
        at renderIndeterminateComponent (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5789:7)
        at renderElement (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5950:7)
        at renderNodeDestructiveImpl (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6108:11)
        at renderNodeDestructive (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
        at renderContextProvider (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5924:3)
        at renderElement (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6021:11)
        at renderNodeDestructiveImpl (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6108:11)
        at renderNodeDestructive (/Users/b/Public/repos/series-app/remix-fundamentals/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
    
    opened by brianseries 1
  • Problem with setup

    Problem with setup

    Hi. I have a problem with: npm run setup. It freezez before completing. (picture 1) I have tried to abort it and run it again but then it runs in a loop and sais prism have an update. (picture 2) Then if i abort that i cant run the exercises. (picture 3)

    picture 1: problem installing

    picture 2: problem installing 2

    picture 3: problem installing 3

    opened by VDunca 1
  • Fix paths for Windows

    Fix paths for Windows

    Without this change, node dev 1 node diff 1 node dev example/01 all fail because the internally-computed paths (which use path.join have backslashes on Windows)

    An alternative fix would be to change dev.ts and diff.ts so they use path.join instead of hard-coding forward-slashes, thereby consistently changing all the slashes to backslashes on Windows instead, but that would also require changing the documentation to cover Windows as a separate case. This change keeps the behaviour consistent across platforms instead.

    For issue: #2

    opened by RoystonS 1
  • Fix final README typos

    Fix final README typos

    Looking through final READMEs, found a typo. Has been fixed in exercise file.

    PR to apply all previous typo fixes (https://github.com/FrontendMasters/remix-fundamentals/pull/3, https://github.com/FrontendMasters/remix-fundamentals/pull/5, https://github.com/FrontendMasters/remix-fundamentals/pull/6, https://github.com/FrontendMasters/remix-fundamentals/pull/7) in exercise files to final.

    opened by storyworks 0
  • npm run setup fails if anaconda is installed

    npm run setup fails if anaconda is installed

    Anaconda installs an old version of openssl in the path ahead of the OS installed version. This seems to break prisma which in turn breaks npm run setup

    Environment variables loaded from .env
    Prisma schema loaded from prisma/schema.prisma
    Error: Get Config: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
    Details: Unable to require(`[xxx]/remix-fundamentals/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node`)
     libssl.so.1.1: cannot open shared object file: No such file or directory
    

    I'm not sure there is anything you can do about it but all I needed to do was conda deactivate in the shell before I ran the setup. I'm reporting this in case anyone else hits this problem. Perhaps you can add a warning somewhere in a troubleshooting section?

    opened by vvaidy 0
  • macOS Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/

    macOS Error: Exercise directory .DS_Store does not match regex /^(?\d+)-/

    It seems that on macOS this might be a problem when running npm run dev or node dev in the root:

    throw new Error(`Exercise directory ${dir} does not match regex ${regex}`);
              ^
    
    Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/
        at null.extractExerciseNumber (/remix-fundamentals-main/scripts/utils/utils.ts:102:11)
        at null.getAppFromPath (/remix-fundamentals-main/scripts/utils/utils.ts:115:36)
        at Array.map (<anonymous>)
        at null.<anonymous> (/remix-fundamentals-main/scripts/utils/utils.ts:113:16)
        at async Promise.all (index 0)
        at null.getApps (/remix-fundamentals-main/scripts/utils/utils.ts:109:50)
        at null.promptForApp (/remix-fundamentals-main/scripts/utils/utils.ts:248:16)
        at null.go (/remix-fundamentals-main/scripts/dev/dev.ts:13:11)
    
    1. I've removed part of the path name for ease of read
    2. no error if npm run dev on an exercise directory (since there is no .DS_Store)
    3. I know I can remove this files (even disable) and it will skip this error, until the file is created again, so maybe a filter for directories/name pattern would help here: scripts/utils.ts
    opened by tiagocouto126 4
  • Prisma Error on each new exercise

    Prisma Error on each new exercise

    watching the video i followed instructions to get prisma working on exercise 2

    however for each new exercise prisma is not working for me, so i need to carry out the steps from ex 02 each time. this should probably be mentioned somewhere or added to the dev script

    for me it works if i run in /exercise/0x-folder npx prisma migrate dev npx prisma db seed and restart node dev x

    👍

    opened by TommyAtOn 2
  • Can we named outlets in a file | Two Outlets for instance

    Can we named outlets in a file | Two Outlets for instance

    • primary outlet and secondary outlet ex: http://:/sales/invoices(popup:compose) http://localhost:4200/outlet-a:page-red/outlet-b:page-green/outlet-c:page-blue
    opened by nikhilkuyya 0
Owner
Frontend Masters
Advance Your Skills with In-Depth JavaScript, Node.js & Front-End Engineering Courses
Frontend Masters
The awesomebooks project is a simple list, but separated into 3 parts and given a retro feel. The main page is where we can add books, and on another page we can see the list, and remove items. There is also a "contact-us" page.

Awesome Books This is the restructured version of the famous awesome-books project! Here you can find JavaScript broken into modules, using import-exp

Matt Gombos 12 Nov 15, 2022
Jumpstart Your Static Web Apps Learning Journey with #30Days Of Content and Activities

30DaysOfSWA - A Learning Journey Welcome to #30DaysOfSWA - a project to give beginners and experienced developers a tour of Azure Static Web Apps from

null 42 Nov 23, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

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

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Happy Birthday is a web-based party live background generated by CANVAS powered by JavaScript. This show a lot of random colorize particles in the background.

Happy BirthDay JS Happy Birthday is a web-based party live background generated by CANVAS powered by JavaScript. This show a lot of random colorize pa

Max Base 9 Oct 29, 2022
My very own fantastic jQuery ZOOM plugin.

jQuery ZOOM plugin Coded by Robert Koteles, Senior Frontend Developer, 2015. This plugin was coded by me while worked as senior web developer/web mana

Robert Koteles 2 Oct 13, 2022
Veselin Petranchev 2 Oct 11, 2022
The Happy Devs Leaderboard allows users to submit their scores. The app then ranks them from highest scores to the lowest.

HAPPY DEVS LEADERBOARD The HAPPY DEVS LEADERBOARD app allows users to submit their scores to be ranked on the Leaderboard. Live Demo Live Demo Link Bu

Benjamin Semah 3 Feb 10, 2022
My terrible attempt at a promposal. Update: She said yes LMFAO Update Update: I got friendzoned right after 😭

TypeScript Next.js example This is a really simple project that shows the usage of Next.js with TypeScript. Deploy your own Deploy the example using V

John Li (Tet) 7 Oct 27, 2022
This package enables you to mount your Remix app at a different path than root

Remix Mount Routes This package enables you to mount your Remix app at a different path than root. ?? Installation > npm install -D remix-mount-routes

Kiliman 26 Dec 17, 2022
This repo is a collection of code samples and links to previous twitch live stream sessions. If you have any ideas or suggestions for future episodes, feel free to open an issue.

Talk DEV to me Talk DEV to me is a monthly show on twitch.tv/aws hosted by Tiago Barbosa and Alex Melnyk, where we invite customers, partners, or Amaz

AWS Samples 122 Jan 6, 2023
Get the latest feed of GitHub Stars out there! 🌟 ⭐ ✨

GitHub Stars Feed Get the latest feed of GitHub Stars out there! ⭐ The GitHub Stars program thanks GitHub’s most influential developers and gives them

Vinit Shahdeo 30 Oct 5, 2022
For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker

For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker. We will create a frontend, a backend, and a database to deploy the Pulumipus Boba Tea Shop. Along the way, we'll learn more about how Pulumi works.

Kat Cosgrove 9 Dec 29, 2022
Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and experiences.

A powerful, flexible, Markdown-based authoring framework. Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and

Markdoc 5.8k Jan 2, 2023
... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.

Salesforce B2C Commerce / Customer 360 Platform Integration Introduction Salesforce B2C Commerce / CRM Sync is an enablement solution designed by Sale

Salesforce CommerceCloud 45 Dec 9, 2022
A framework for building collaborative Microsoft Teams and M365 experiences.

Live Share SDK The Live Share SDK is in preview. You will need to be part of the Developer Preview Program for Microsoft Teams to use this feature. Th

Microsoft 65 Jan 1, 2023
The front-end CSS framework for building experiences for Office and Microsoft 365.

Office UI Fabric Core The front-end framework for building experiences for Office and Office 365. Fabric is a responsive, mobile-first collection of s

Office Developer 3.7k Dec 20, 2022
Demo for my talk "Stream Away the Wait" – a talk about making excellent pending experiences.

?? Stream Away the Wait When implementing the design of a user interface, we often finish before remembering that not everyone's running the app's ser

Kent C. Dodds 25 Nov 1, 2022