react-setup

Automates React+Vite frontend setup with Django backend, HTTPS, and CSRF.

2|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/otoshek/Claude-Code-Toolkit --skill react-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-setup
Source: https://github.com/otoshek/Claude-Code-Toolkit/tree/main/skills/react-setup
Command: npx skills add https://github.com/otoshek/Claude-Code-Toolkit --skill react-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines bootstrapping a Django-enabled React + Vite project, reducing setup time and misconfigurations for CSRF, HTTPS, and routing.

Core Features & Use Cases

  • HTTPS dev with mkcert: set up a secure local development server.
  • CSRF-ready setup: configure Axios and Django CSRF integration.
  • Routing scaffold: basic Router/Layout and health checks to ensure backend connectivity.
  • Automated verification: build and verify the initial project to ensure a clean start.

Quick Start

Use the react-setup skill to bootstrap a new React + Vite project and configure it to talk to a Django backend over HTTPS. Run the initial project bootstrap steps and verify the build completes successfully.

Frequently Asked Questions about react-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a React and Vite app to work with a Django backend over HTTPS?

React and Vite setup with Django integration requires configuring HTTPS locally, handling CSRF tokens, and connecting via Axios. This Skill automates that process—it generates vite.config.js with mkcert certificates, configures Axios with CSRF injection, sets up routing scaffolds, and verifies backend connectivity through a health check endpoint.

How do I configure CSRF protection between React and Django?

CSRF protection requires your frontend to read Django's CSRF token and include it in API requests. This Skill configures an Axios instance that automatically extracts the CSRF token from cookies and injects it as the X-CSRFToken header, eliminating manual token handling in every request.

Can I use mkcert for local HTTPS development with Vite and Django?

Yes. mkcert generates trusted local certificates for development. This Skill sets up mkcert certificates and configures vite.config.js to serve your React app over HTTPS, matching Django's secure backend for testing cookie-based CSRF and authentication flows locally.

What do I need to verify after setting up a React + Vite + Django project?

After bootstrap, verify that your frontend builds successfully and can reach the Django backend health check endpoint at /api/health/. This Skill includes automated verification steps to confirm HTTPS connectivity, Axios configuration, and backend responsiveness before development begins.

Do I need to manually configure routing and API calls for a new React + Django project?

This Skill generates Router and Layout scaffolds plus a pre-configured Axios instance, reducing manual boilerplate. You get a working foundation with routing structure and API client ready—you fill in your route components and API endpoints.

What is the best way to handle withCredentials in Axios when connecting to Django?

withCredentials enables cookies to be sent and received in cross-origin requests, required for CSRF and session-based auth. This Skill configures your Axios instance with withCredentials: true and automatic CSRF token injection, so credentials flow correctly between React and Django.