This repository provides a starter kit for building a full-stack application using AdonisJS for the API and React for the client.
It includes an OAuth2 authentication flow, allowing users to log in with their provider account.
Client-side state management is handled with Zustand.
Shared types are provided to ensure consistency between the API and the client.
- Features
- Project Structure
- Prerequisites
- Installation
- Usage
- VSCode Tips
- TypeScript Configuration
- License
- Ready-to-use OAuth2 authentication
- Shared types and utilities (
/shared) - TypeScript monorepo
- Unified development scripts
/api # AdonisJS backend
/client # React frontend
/shared # Shared types
- Clone the repository:
git clone <repo-url> cd starter-react-adonisjs-api
- Install dependencies:
bun install
- Copy the
.env.examplefiles to create.envfiles in both/apiand/clientdirectories, then adjust them as needed:cp api/.env.example api/.env cp client/.env.example client/.env
# Start all services
bun run dev
# Or start only the client
bun run dev:client
# Or start only the API
bun run dev:api
# Or start only the shared (types and utils)
bun run dev:sharedOpen your browser at:
- http://localhost:5173 to view the client
- http://localhost:3333 to view the API
You can use Run Task then dev:all to start all services at once in integrated terminals and automatically open your default browser when ready.
If you want to add a new path in the client's tsconfig.json, add it to tsconfig.app.json and run:
bun run merge-tsconfigThis will merge the config cleanly with the monorepo root config without overwriting existing paths.
Contributions are welcome!
Feel free to open an issue or submit a pull request if you want to improve this project.
This project is distributed under the GNU General Public License v3.0.
See the LICENSE file for more information.