Skip to content

Commit eb2bd9a

Browse files
committed
chore: update readme
1 parent 06ea301 commit eb2bd9a

File tree

5 files changed

+90
-39
lines changed

5 files changed

+90
-39
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</p>
1010

1111
<p>
12-
Choose the right foundation for your next project based on your preferred frontend approach.
12+
Choose the right foundation for your next project based on your preferred architecture.
1313
</p>
1414

1515
<br>
@@ -29,11 +29,12 @@
2929

3030
## 📦 Available Starter Kits
3131

32-
This repository contains the official AdonisJS starter kits, each tailored for different frontend approaches and use cases.
32+
This repository contains the official AdonisJS starter kits, each tailored for different architectures and use cases.
3333

3434
| Starter Kit | Description | Best For |
3535
|-------------|-------------|----------|
36-
| [**API**](./api) | Type-safe REST API with dual authentication (tokens & sessions) | Building APIs for any frontend, mobile apps, third-party integrations |
36+
| [**API**](./api) | Standalone type-safe REST API with dual authentication (tokens & sessions) | Backend-only services, mobile apps, third-party integrations |
37+
| [**API Monorepo**](./api-monorepo) | API backend + dedicated frontend workspace in a monorepo | Full-stack teams that want backend and frontend in the same repository |
3738
| [**Hypermedia**](./hypermedia) | Server-rendered applications with Edge.js templates and Alpine.js | Traditional web apps, admin panels, content sites |
3839
| [**Inertia React**](./inertia-react) | Single-page applications with React and Inertia.js | Modern SPAs with React ecosystem |
3940
| [**Inertia Vue**](./inertia-vue) | Single-page applications with Vue and Inertia.js | Modern SPAs with Vue ecosystem |
@@ -44,7 +45,7 @@ This repository contains the official AdonisJS starter kits, each tailored for d
4445

4546
### API Starter Kit
4647

47-
Build type-safe REST APIs with dual authentication (API tokens and sessions) that work with any frontend framework.
48+
Build a standalone, type-safe REST API with dual authentication (API tokens and sessions).
4849

4950
```bash
5051
npm init adonisjs@latest -- -K=api
@@ -56,6 +57,20 @@ npm init adonisjs@latest -- -K=api
5657

5758
---
5859

60+
### API Monorepo Starter Kit
61+
62+
Build a full-stack monorepo with an AdonisJS API backend and a dedicated frontend workspace.
63+
64+
```bash
65+
npm init adonisjs@latest -- -K=api-monorepo
66+
```
67+
68+
**Includes:** API backend workspace, frontend workspace scaffold, Turborepo orchestration, shared type-safe API integration with Tuyau
69+
70+
[Learn more about API Monorepo →](./api-monorepo)
71+
72+
---
73+
5974
### Hypermedia Starter Kit
6075

6176
Build server-rendered applications with Edge.js templating and progressive enhancement using Alpine.js.
@@ -112,6 +127,13 @@ During setup, select `vue` as your frontend adapter.
112127
- Flexible authentication (API tokens for cross-origin, sessions for same-domain)
113128
- Framework-agnostic API-first architecture
114129

130+
### Choose API Monorepo if you want:
131+
132+
- Keep your backend API and frontend app in the same repository
133+
- Share types and API contracts across workspaces
134+
- Run development, test, and build workflows from one monorepo toolchain
135+
- Start with an API-first backend plus a dedicated frontend workspace
136+
115137
### Choose Hypermedia if you want:
116138

117139
- Fast initial page loads with server-side rendering

api-monorepo/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<div align="center">
2+
3+
<h1>API Monorepo Starter Kit</h1>
4+
5+
<p>
6+
<strong>A dedicated AdonisJS monorepo starter with an API backend and a frontend workspace.</strong>
7+
</p>
8+
9+
</div>
10+
11+
---
12+
13+
## ✨ What's in the Box
14+
15+
- **API backend workspace** in `apps/backend` (AdonisJS + authentication + Tuyau)
16+
- **Frontend workspace** in `apps/frontend` (intentionally empty, bring your own framework)
17+
- **Monorepo tooling** with Turborepo and workspaces for coordinated scripts
18+
19+
---
20+
21+
## 🚀 Quick Start
22+
23+
```bash
24+
npm init adonisjs@latest -- -K=api-monorepo
25+
```
26+
27+
Then from your generated project:
28+
29+
```bash
30+
# Install dependencies
31+
npm install
32+
33+
# Run all workspace development scripts
34+
npm run dev
35+
```
36+
37+
---
38+
39+
## 📁 Workspaces
40+
41+
- [Backend workspace docs](./apps/backend/README.md)
42+
- [Frontend workspace docs](./apps/frontend/README.md)

api-monorepo/apps/backend/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div align="center">
22

3-
<h1>API Starter Kit</h1>
3+
<h1>API Monorepo Starter Kit - Backend Workspace</h1>
44

55
<p>
6-
<strong>A batteries-included AdonisJS starter kit for building modern, type-safe APIs.</strong>
6+
<strong>The backend workspace for the AdonisJS API Monorepo starter kit.</strong>
77
</p>
88

99
<p>
10-
Built for developers who want a production-ready API with any frontend framework.
10+
Built for teams who want a production-ready API inside a full-stack monorepo.
1111
</p>
1212

1313
<br>
@@ -27,7 +27,7 @@
2727

2828
## ✨ What's in the Box
2929

30-
This starter kit is designed to help you build production-ready APIs with AdonisJS. It provides a solid foundation with authentication, type-safe routes, and everything you need to build modern APIs that work with any frontend framework.
30+
This backend workspace is designed to help you build production-ready APIs with AdonisJS. It provides a solid foundation with authentication, type-safe routes, and everything you need to power any frontend from a shared monorepo.
3131

3232
### 🎯 Core Features
3333

@@ -148,7 +148,7 @@ Your API will be running at `http://localhost:3333`
148148
- `POST /api/v1/auth/signup` - Create a new account
149149
- `POST /api/v1/auth/login` - Login and get access token
150150
- `POST /api/v1/auth/logout` - Logout (requires authentication)
151-
- `GET /api/v1/me` - Get current user (requires authentication)
151+
- `GET /api/v1/account/profile` - Get current user profile (requires authentication)
152152

153153
---
154154

@@ -219,7 +219,7 @@ You can easily switch between strategies by changing the guard in your middlewar
219219

220220
## 🤝 Contributing
221221

222-
This starter kit is maintained by the AdonisJS team. Found a bug or have a suggestion? [Open an issue](https://github.com/adonisjs/api-starter-kit/issues) or submit a pull request!
222+
This starter kit is maintained by the AdonisJS team. Found a bug or have a suggestion? [Open an issue](https://github.com/adonisjs/starter-kits/issues) or submit a pull request!
223223

224224
---
225225

api-monorepo/apps/frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Frontend Workspace
22

3-
This is an **empty frontend starter** for the AdonisJS API Starter Kit. You can set up any frontend application to consume the type-safe API from the backend.
3+
This is an **empty frontend starter** for the AdonisJS API Monorepo Starter Kit. You can set up any frontend application to consume the type-safe API from the backend.
44

55
## 🎯 Purpose
66

api/README.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</p>
88

99
<p>
10-
Built for developers who want a production-ready API with any frontend framework.
10+
Built for developers who want a production-ready standalone API.
1111
</p>
1212

1313
<br>
@@ -38,7 +38,6 @@ This starter kit is designed to help you build production-ready APIs with Adonis
3838
- **🛡️ Security First** - CORS, Shield middleware, and secure authentication
3939
- **🔒 Type Safety** - End-to-end TypeScript with Tuyau for type-safe API calls
4040
- **🌐 CORS Ready** - Pre-configured for cross-origin requests
41-
- **📦 Monorepo** - Built with Turborepo and npm workspaces for optimal DX
4241

4342
### 🔧 Tech Stack
4443

@@ -85,48 +84,36 @@ This starter kit is designed to help you build production-ready APIs with Adonis
8584
Full TypeScript support with strict mode enabled
8685
</td>
8786
</tr>
88-
<tr>
89-
<td><strong>Monorepo</strong></td>
90-
<td>
91-
<a href="https://turbo.build">Turborepo</a> + npm workspaces
92-
</td>
93-
</tr>
9487
</table>
9588

9689
---
9790

9891
## 🚀 Quick Start
9992

100-
### From the Monorepo Root
93+
### From the Project Root
10194

10295
```bash
10396
# Install dependencies
10497
npm install
10598

106-
# Run the development server (both backend and frontend)
107-
npm run dev
99+
# Copy environment variables
100+
cp .env.example .env
108101

109-
# Run tests
110-
npm run test
102+
# Generate application key
103+
node ace generate:key
111104

112-
# Type check all apps
113-
npm run typecheck
105+
# Run database migrations
106+
node ace migration:run
114107

115-
# Lint all apps
116-
npm run lint
117-
118-
# Build for production
119-
npm run build
108+
# Run the development server with hot reload
109+
npm run dev
120110
```
121111

122-
### Backend Only (from apps/backend)
112+
### Useful Commands
123113

124114
```bash
125-
# Run the development server with hot reload
126-
node ace serve --hmr
127-
128115
# Run tests
129-
node ace test
116+
npm run test
130117

131118
# Type check
132119
npm run typecheck
@@ -148,7 +135,7 @@ Your API will be running at `http://localhost:3333`
148135
- `POST /api/v1/auth/signup` - Create a new account
149136
- `POST /api/v1/auth/login` - Login and get access token
150137
- `POST /api/v1/auth/logout` - Logout (requires authentication)
151-
- `GET /api/v1/me` - Get current user (requires authentication)
138+
- `GET /api/v1/account/profile` - Get current user profile (requires authentication)
152139

153140
---
154141

@@ -181,9 +168,9 @@ Your API will be running at `http://localhost:3333`
181168
</tr>
182169
<tr>
183170
<td>
184-
<a href="https://turbo.build"><strong>📦 Turborepo</strong></a>
171+
<a href="https://docs.adonisjs.com/guides/authentication/introduction"><strong>🔐 Authentication Guide</strong></a>
185172
<br>
186-
<span>Monorepo build system</span>
173+
<span>Sessions and access tokens in AdonisJS</span>
187174
</td>
188175
<td>
189176
<a href="https://docs.adonisjs.com/guides/security/cors"><strong>🌐 CORS Guide</strong></a>

0 commit comments

Comments
 (0)