Skip to content

Casper-Studios/takehome-assignment-ts

Repository files navigation

Welcome to React Router!

A modern, production-ready template for building full-stack React applications using React Router.

Features

  • 🚀 Server-side rendering
  • ⚡️ Hot Module Replacement (HMR)
  • 📦 Asset bundling and optimization
  • 🔄 Data loading and mutations
  • 🔒 TypeScript by default
  • 🎉 TailwindCSS for styling
  • 🔐 Better Auth integration
  • 🗄️ Drizzle ORM with D1 Database
  • 📡 tRPC API
  • 📖 React Router docs

Getting Started

Installation

Install the dependencies:

npm install

Development

Start the development server with HMR:

npm run dev

Your application will be available at http://localhost:5173.

Authentication Setup

This project uses Better Auth for authentication. The authentication secret is stored in .dev.vars for local development and has been pre-configured with a secure random value.

For production deployment, set the secret using Wrangler:

# Generate a new secret
openssl rand -base64 32

# Set the secret in Cloudflare
wrangler secret put BETTER_AUTH_SECRET

The authentication API is available at /api/auth/*.

Previewing the Production Build

Preview the production build locally:

npm run preview

Building for Production

Create a production build:

npm run build

Deployment

Deployment is done using the Wrangler CLI.

To build and deploy directly to production:

npm run deploy

To deploy a preview URL:

npx wrangler versions upload

You can then promote a version to production after verification or roll it out progressively.

npx wrangler versions deploy

Styling

This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.


Built with ❤️ using React Router.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors