A custom Sign-In with Ethereum (SIWE) backend setup for use with RainbowKit and a React frontend.
This configuration allows you to integrate Ethereum-based authentication into your applications with a flexible backend, while leveraging RainbowKit via Tanstack Start on the frontend.
PNPM is used as the package manager of this repository.
ESLint is included for code quality and linting, and Prettier is included for automatic code formatting.
Together, they ensure your code is consistent, readable, and free of common errors.
- Customizable SIWE backend for Ethereum authentication
- Easy integration with RainbowKit and React
- Supports session management and secure wallet login
- JavaScript-ready and extendable for more complex use cases. See this (repository)[] that implements TypeScript
- ESLint for catching code errors and enforcing best practices
- Prettier for consistent code formatting
- Clone the repository:
git clone https://github.com/your-username/custom-rainbowkit-backend.git
cd custom-rainbowkit-backend- Install dependencies
pnpm install-
Rename the
env.examplefile to.envor.env* -
Set up the environment variables in your
.envfile -
Start the backend server
pnpm dev- Use the following scripts to maintain code quality
# Check for linting issues
pnpm lint
# Auto-fix linting issues
pnpm lint:fix
# Format code with Prettier
pnpm format-
PORT: The port on which the backend server will run (default: 5000) -
JWT_SECRET: A secret key for signing JWT tokens (required) -
NODE_ENV: The environment mode (development or production, default: development) -
You can create an
.env.development.localfile for development-specific variables and anenv.production.localfile for production-specific variables. Ensure you setNODE_ENVaccordingly when running the server.