# Use and adapt Taghmesa

Use the documented interfaces and source layout for **Taghmesa**. The sections below retain the README’s examples and configuration details.

## Authentication and authorization

Better Auth owns the shared `user`, `session`, `account`, and `verification` tables. Customers can create an email/password account at `/register` and sign in at `/login`. The Better Auth admin plugin adds role, ban, and impersonation support; storefront accounts receive the `user` role and only users with the `admin` role can access `/admin/*` pages or `/api/admin/*` endpoints.

The seed command creates the configured admin through Better Auth, or promotes an existing account with the same email. The old `admin_users` and `admin_sessions` tables remain in the database for a non-destructive transition but are no longer consulted by the application. Existing username-only administrators must use the configured `INITIAL_ADMIN_EMAIL` and rerun the seed once after applying migration `0001`.

## Commands in the root manifest

The captured [package.json](https://github.com/Up-to-code/Taghmesa/blob/HEAD/package.json) declares the following scripts. Run them from the directory containing that manifest.

| Command | Script |
| --- | --- |
| `npm run dev` | `next dev --webpack` |
| `npm run build` | `next build` |
| `npm run start` | `next start` |
| `npm run lint` | `eslint .` |
| `npm run typecheck` | `tsc --noEmit` |
| `npm run test` | `vitest run` |

## Troubleshoot a local change

1. Reproduce the smallest example from the [quick-start guide](/docs/up-to-code-taghmesa/quick-start-guide).
2. Compare required configuration and dependency versions with the README.
3. Check the linked issue tracker for the same error. Include the command, runtime version, and relevant error when reporting a problem; omit credentials.

## Source and help

- [GitHub repository](https://github.com/Up-to-code/Taghmesa)
- [Original README](https://github.com/Up-to-code/Taghmesa/blob/main/README.md)
- [Issues and existing reports](https://github.com/Up-to-code/Taghmesa/issues)
- [Open the project website](https://taghmesa-store.vercel.app)
