Download the PHP package laraveldaily/api-starter-kit without Composer

On this page you can find all versions of the php package laraveldaily/api-starter-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-starter-kit

Laravel API Starter Kit

A Laravel API-only starter kit: token-based authentication and account management as plain, readable Laravel code. No front-end, no Vite, no Fortify — just controllers, Form Requests, API Resources, and a green test suite.

Disclaimer: this starter kit was built fully by Claude Fable 5 model, after deep planning session and a few building iterations. So it wasn't a one-shot or vibe-coding, but LLM did all the implementation work.

Features

Installation

The installer asks two questions:

Or with Composer directly (no prompts at all):

Either way you get a generated APP_KEY, an SQLite database, and migrated tables out of the box. Start the server with:

The mailer defaults to MAIL_MAILER=log, so password reset codes land in storage/logs/laravel.log — the whole auth flow works with zero mail setup.

Endpoints

All routes live under /api/v1. Authenticated routes expect an Authorization: Bearer <token> header. All responses (including errors) are JSON.

Method Path Auth Purpose
POST /api/v1/register Create an account, receive a token
POST /api/v1/login Issue a token for valid credentials
POST /api/v1/forgot-password Email a 6-digit reset code
POST /api/v1/reset-password Set a new password using the code
POST /api/v1/logout Revoke the current token
GET /api/v1/user Get the authenticated user
PUT /api/v1/user Update name and/or email
PUT /api/v1/user/password Change password (revokes other tokens)
DELETE /api/v1/user Delete the account (password confirmed)
GET /api/v1/tokens List active tokens
DELETE /api/v1/tokens/{id} Revoke one token
DELETE /api/v1/tokens Revoke all tokens except the current one

Register

device_name is optional everywhere a token is issued; it defaults to api.

Login

Returns the same { token, token_type, user } shape as register. Invalid credentials return 422 with an email error. Login is throttled to 5 attempts per minute per email + IP.

Logout

Revokes the token used to authenticate the request.

Returns 204 No Content.

Forgot password

The response is identical whether or not the account exists, so callers cannot enumerate emails. When the account exists, a 6-digit code is emailed (logged, by default) and is valid for 15 minutes (config/auth.phppasswords.users.expire).

Reset password

A successful reset deletes the code (single use) and revokes every token the user holds. A missing, expired, or wrong code always returns the same generic 422:

Brute-force note: the 6-digit code is protected by throttling (5 requests per minute per email + IP), the 15-minute expiry, and single-use deletion. Tighten further (longer code, attempt counter) if your threat model needs it.

Get the current user

Update profile

Send only the fields you want to change. Emails are normalized to lowercase.

Returns the updated user. Email changes take effect immediately — there is no verification flow in v1 (see Future add-ons).

Change password

Every other token is revoked; the token that made the request keeps working.

Delete account

Returns 204 No Content. All tokens are revoked and the user row is deleted.

List tokens

Token hashes are never exposed.

Revoke one token

Returns 204 No Content, or 404 when the token does not exist or belongs to another user.

Revoke all other tokens ("log out everywhere")

Returns 204 No Content. Every token except the current one is revoked.

Error shapes

All /api/* errors render as JSON:

Status Body
422 validation { "message": "...", "errors": { "field": ["..."] } }
401 unauthenticated { "message": "Unauthenticated." }
404 not found { "message": "..." }
429 throttled { "message": "Too Many Attempts." } + Retry-After header
500 { "message": "Server Error." } (trace only with APP_DEBUG=true)

Rate limiting

Defined in app/Providers/AppServiceProvider.php:

Limiter Limit Applied to
api 60/min per user (or IP) everything else
login 5/min per email + IP /login
password 5/min per email + IP /forgot-password, /reset-password

API documentation

Interactive OpenAPI 3.1 docs are generated from the code by Scramble:

Both are restricted to the local environment by the viewApiDocs gate in app/Providers/AppServiceProvider.php; relax that gate to expose them elsewhere.

Token expiration

Tokens do not expire by default. Set expiration (minutes) in config/sanctum.php to give every token a lifetime.

CORS

config/cors.php allows all origins for api/* — safe for token auth because no cookies or credentials are involved. Pin allowed_origins in production if you prefer.

Development

Future add-ons

Deliberately not in v1, and designed to bolt on cleanly:

License

The MIT License.


All versions of api-starter-kit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
dedoc/scramble Version ^0.13.26
laravel/framework Version ^13.8
laravel/sanctum Version ^4.0
laravel/tinker Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laraveldaily/api-starter-kit contains the following files

Loading the files please wait ...