A ready-to-use starter template that combines Remix, Netlify, Sanity CMS, and Tailwind CSS for rapid web application development.
Before you begin, ensure you have installed:
I want to set up a new project using the Remix-Netlify-Sanity-Tailwind starter. I'll need help with:
1. Setting up the project and installing dependencies
2. Configuring Sanity with my project details
3. Setting up Git for version control
4. Deploying to Netlify
Ok create a new component called process that’s populated by sanity. It should have 3 cards that stack on mobile.
there should be an image upload field for the icons, an h2 (title), and p (description).
there should be an hr in between the title and description.
the first card should have the colors inverted with the background as our primary color.
here’s the primary color if you want to create a variable #17283D.
see the mockup attached.
- Open your terminal and run:
git clone https://github.com/your-username/remix-netlify-sanity-tailwind-starter.git my-project
cd my-project- Delete the existing Git repository and initialize a new one:
rm -rf .git
git init
git add .
git commit -m "Initial commit"- Create a new repository on GitHub, then connect your local repository:
git remote add origin https://github.com/your-username/your-repo-name.git
git push -u origin mainnpm install- Update the
.envfile with your Sanity project information:
SANITY_PROJECT_ID=YOUR_SANITY_PROJECT_ID
SANITY_DATASET=YOUR_SANITY_DATASET
You'll replace these values with those from your Sanity project in the next steps.
- Install the Sanity CLI globally:
npm install -g @sanity/cli- Create a new Sanity project:
sanity login
sanity init-
During initialization:
- Select "Create new project"
- Enter a project name
- Use the default dataset configuration
- Choose "Clean project with no predefined schemas" as your template
-
After initialization, note your Project ID from the console output or find it in the Sanity management console at https://www.sanity.io/manage.
Update the following files with your Sanity Project ID and dataset name:
.envsanity-studio/sanity.config.tssanity-studio/sanity.cli.tsstudio/sanity.config.tsstudio/sanity.cli.ts
Replace YOUR_SANITY_PROJECT_ID with your actual Sanity Project ID and YOUR_SANITY_DATASET with your dataset name (usually "production").
Open a terminal and run:
cd sanity-studio
npm install
npm run devThis will start Sanity Studio on http://localhost:3333
Open another terminal window and from the project root run:
npm run devThis will start your Remix app on http://localhost:3000
-
Install recommended extensions:
- ESLint
- Prettier
- Tailwind CSS IntelliSense
- ES7+ React/Redux/React-Native snippets
-
Use the integrated terminal in VS Code to run commands:
- Open Terminal menu > New Terminal
- Run commands directly in the terminal panel
-
Split terminals to run both Sanity and Remix servers simultaneously:
- Click the Split Terminal button in the terminal panel
- Run Sanity in one terminal and Remix in the other
- Push your code to GitHub, GitLab, or Bitbucket
- Log in to Netlify
- Click "Add new site" > "Import an existing project"
- Choose your Git provider and select your repository
- Configure build settings:
- Build command:
npm run build - Publish directory:
public
- Build command:
- Click "Deploy site"
- In site settings, add your environment variables:
- SANITY_PROJECT_ID
- SANITY_DATASET
- Install the Netlify CLI:
npm install -g netlify-cli- Log in to Netlify:
netlify login- Connect to your Netlify site:
netlify init- Deploy your site:
netlify deploy --build --prod- Customize the content schemas in the
sanity-studio/schemasdirectory - Modify the Remix routes in the
app/routesdirectory - Customize the Tailwind configuration in
tailwind.config.js - Update the site title and metadata in
app/routes/_index.tsx
- Sanity Connection Issues: Ensure your Project ID and dataset name are correct in all configuration files
- Build Errors: Check that all dependencies are installed with
npm install - Deployment Issues: Verify environment variables are correctly set in Netlify