Coder Social home page Coder Social logo

one-aalam / remix-starter-kit Goto Github PK

View Code? Open in Web Editor NEW
232.0 6.0 27.0 1.3 MB

Remix with brilliant bells and useful whistles

TypeScript 97.53% JavaScript 2.16% CSS 0.13% Shell 0.18%
remix remixrun tailwindcss daisyui eslint full starter-kit starter-template full-stack supabase-js

remix-starter-kit's Introduction


Remix + Supabase starter for Typescript lovers

Remix Starter Kit is an opinionated boilerplate based off of Remix, with all the bells and whistles you would want ready, up and running when starting a Remix project with Supabase.


Out of the box you get all the essentials

  • Typescript as the language choice
  • Tailwind CSS for quick styling without getting out of your HTML
  • Daisy UI for pre-made TailwindCSS component classes
  • Headless UI + React Hot Toast for robust headless logic you can use for components like Dialog/Modal, Dropdown, List, etc.
  • WorkSans as the App font
  • Icons through React-icons for on-demand, tree-shakeable icons
  • ESLint for static code analysis
  • Prettier for code formatting (even for your TailwindCSS classes - sorted as per Tailwindlab reccomendations)
  • Playwright for reliable end-to-end test cases (+ end-to-end test cases for the homepage and the sign-in page)

with Supabase support

  • Authentication System with Supabase GoTrue
  • User Profiles available on /profile as an example for Supabase PostgREST (CRUD API) (retreival-only for now)
  • User Avatar with Supbase Storage(AWS S3 backed effortless uploads) available on /images/[bucket-name]/[image-name] resource routes. When retrieving you use the SDK server-side, and when uploading you use the client-side SDK loaded from CDN to upload the images to Supabase managed buckets, which are linked to profile on successful uploads.

and a bunch of pre-made, hand-rolled(easily replace-able) components, that you almost always end up installing/using for any non-trivial project

Note: Refer the basic branch for a bare minimum starter structure with all the essentials.

Quick Start

The best way to start with this template is to click "Use this template" above, create your own copy and work with it

Development

To start the project locally, run:

npm run dev

which kickstarts the Remix development and build server as well as TailwindCSS compilation in the watch mode. Open http://localhost:3000 in your browser to start working.

Check package.json for the full list of commands available at your disposal.

How to Setup Supabase for Remix Starter Kit?

If new to Supabase

  • Create account at Supabase
  • Create a Organisation, and a project

Once done, or if you already have a Supabase project

  • Copy the generated project's API authentication details from https://app.supabase.io/project/<your-awesome-remix-project>/api?page=auth
  • Place the details in .env as SUPABASE_URL and SUPABASE_KEY
  • Install NPM dependencies, by running npm install or npm i

Remix Starter Kit supports user profiles and user avatars. To get the profile table and storage ready, execute the following queries at https://app.supabase.io/project/<your-awesome-remix-project>/editor/sql

-- Create a table for Public Profiles
create table profiles (
  id uuid references auth.users not null,
  username text unique,
  avatar_url text,
  website text,
  updated_at timestamp with time zone,

  primary key (id),
  unique(username),
  constraint username_length check (char_length(username) >= 3)
);

alter table profiles enable row level security;

create policy "Public profiles are viewable by everyone."
  on profiles for select
  using ( true );

create policy "Users can insert their own profile."
  on profiles for insert
  with check ( auth.uid() = id );

create policy "Users can update own profile."
  on profiles for update
  using ( auth.uid() = id );

-- Set up Storage!
insert into storage.buckets (id, name)
values ('avatars', 'avatars');

create policy "Avatar images are publicly accessible."
  on storage.objects for select
  using ( bucket_id = 'avatars' );

create policy "Anyone can upload an avatar."
  on storage.objects for insert
  with check ( bucket_id = 'avatars' );

Note When going live remember to configure SUPABASE_URL and SUPABASE_KEY in your deployment service provider like Vercel

What you'll get?

With all the configs done right, you should get the following screens/views up and running

Sign In


Sign In


Sign In (with validation errors)


Sign In


Sign Up


Sign In


Profile (default landing)


Sign In


Profile Update Screen (with image upload)


Sign In

Recommendations

  • Use npm-check-updates to ineractively update your dependencies using ncu -i

License

MIT

remix-starter-kit's People

Contributors

lucaspedroabreu avatar morgemoensch avatar one-aalam avatar segheysens avatar simonswiss avatar wancup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

remix-starter-kit's Issues

Internal Server Error Accessing the App in Vercel

Describe the bug

Accessing the application via Vercel through the link:

https://remix-starter-kit.vercel.app/

Show the following page:

Screen Shot 2022-06-07 at 11 19 05 AM

Your Example Website or App

https://remix-starter-kit.vercel.app/

Steps to Reproduce the Bug or Issue

  1. Navigate to the page: https://remix-starter-kit.vercel.app/
  2. Error message is displayed.

Expected behavior

Application should display correctly

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome

Additional context

No response

Is the profiles supabase call authenticated?

First of all, nice work! ๐Ÿ˜Š

I have a Q around authenticated queries to be used with supabase policies.

Is your profiles call to supabase an authenticated request? If so, how do you make it work?

dev:remix does not build on windows

Describe the bug

[dev:*remix] > dev:remix
[dev:*remix] > node -r dotenv/config node_modules/.bin/remix dev
[dev:*remix]
[dev:*remix] C:\Users\sam\path\to\my-app\node_modules.bin\remix:2
[dev:*remix] basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
[dev:*remix] ^^^^^^^
[dev:*remix]
[dev:*remix] SyntaxError: missing ) after argument list
[dev:*remix] at Object.compileFunction (node:vm:352:18)
[dev:*remix] at wrapSafe (node:internal/modules/cjs/loader:1032:15)
[dev:*remix] at Module._compile (node:internal/modules/cjs/loader:1067:27)
[dev:*remix] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
[dev:*remix] at Module.load (node:internal/modules/cjs/loader:981:32)
[dev:*remix] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[dev:*remix] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
[dev:*remix] at node:internal/main/run_main_module:17:47
[dev:*remix] npm run dev:remix exited with code 1

looks like node is having trouble with this command on windows:

node -r dotenv/config node_modules/.bin/remix dev

I'm using node version 16.14.2

Thanks,
Sam

Your Example Website or App

https://github.com/one-aalam/remix-starter-kit

Steps to Reproduce the Bug or Issue

  1. clone the repository on a windows machine (with node version 16.14.2)
  2. edit the .env to include your supabase variables
  3. npm run dev
  4. see error

Expected behavior

no error

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Node version 16.14.2

Additional context

No response

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.