Getting Started with React
Integrate AuthCore into your existing React (Vite) application.
1Create a New Vite App
Start by creating a new React application using Vite.
2Install AuthCore Package
Install the AuthCore package. Installing the package does not automatically scaffold backend files into your project — that is an explicit step. For full-stack templates (API routes, Prisma schema, env examples) run the CLI (for example: npx authcore init
) or use the interactive setup described in the Quick Start. For frontend-only usage you can use the React UI components without the server pieces.
3Wrap your App with AuthProvider
To use the authentication hooks and components, wrap your application's root with the `AuthProvider`.
4Use Authentication Components
You can now use components like `AuthForm` or hooks like `useAuth` throughout your application.
Backend Required
The React package provides UI components and hooks. You are responsible for creating the backend API endpoints that the components will call. The Next.js integration provides a full-stack solution with backend endpoints included. To copy the Next.js API templates and Prisma schema into your project, run npx authcore init
(or the CLI's setup command) — installation alone will not modify your files.