Kickstart your Next.js development with this ready-to-use starter project integrated with Appwrite
Clone the Project Clone this repository to your local machine using Git:
git clone https://github.com/appwrite/starter-for-nextjs
- Configure Appwrite
Navigate to.envand update the values to match your Appwrite project credentials. - Customize as needed
Modify the starter kit to suit your app's requirements. Adjust UI, features, or backend integrations as per your needs. - Install dependencies
Runnpm installto install all dependencies. - Run the app
Start the project by runningnpm run dev.
The application requires the following tables in your Appwrite TablesDB:
| Column | Type | Required |
|---|---|---|
| label | String | No |
| description | String | No |
| aliases | Array | No |
| Column | Type | Required |
|---|---|---|
| subject_id | String | Yes |
| property_id | String | Yes |
| value_type | String | Yes |
| value | String | No |
| value_entity_id | String | No |
| rank | String | No |
| Column | Type | Required |
|---|---|---|
| claim_id | String | Yes |
| property_id | String | Yes |
| value_type | String | Yes |
| value | String | No |
| value_entity_id | String | No |
| Column | Type | Required |
|---|---|---|
| claim_id | String | Yes |
| property_id | String | Yes |
| value_type | String | Yes |
| value | String | No |
| value_entity_id | String | No |
| Column | Type | Required | Description |
|---|---|---|---|
| action | String | Yes | create, update, delete |
| entity_type | String | Yes | entity, claim, qualifier, reference |
| entity_id | String | Yes | ID of the affected entity |
| user_id | String | No | ID of the user who made the change |
| user_name | String | No | Name of the user |
| previous_data | String | No | JSON string of previous data |
| new_data | String | No | JSON string of new data |
| metadata | String | No | Additional JSON metadata |
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your-project-id
NEXT_PUBLIC_APPWRITE_DATABASE_ID=your-database-id
NEXT_PUBLIC_AUTH_ENABLED=true
NEXT_PUBLIC_MAIN_TEAM_ID=main
# Storage Buckets (opcional - para datos grandes como GeoJSON, imágenes, etc.)
NEXT_PUBLIC_BUCKET_IMAGES=images
NEXT_PUBLIC_BUCKET_GEOJSON=geojson
NEXT_PUBLIC_BUCKET_JSON=json
NEXT_PUBLIC_BUCKET_FILES=filesNota:
NEXT_PUBLIC_MAIN_TEAM_IDes el ID del equipo principal de administradores. Los miembros de este equipo tienen permisos de administrador automáticamente.
Para almacenar datos grandes (GeoJSON, imágenes, JSON extensos), la aplicación utiliza Appwrite Storage. Crea los siguientes buckets en tu proyecto Appwrite:
| Bucket ID | Descripción | Tipos MIME |
|---|---|---|
images |
Imágenes subidas | image/jpeg, image/png, image/gif, image/webp |
geojson |
Archivos GeoJSON grandes | application/geo+json, application/json |
json |
JSON genéricos grandes | application/json |
files |
Archivos generales | * |
Los datos se suben automáticamente a buckets cuando superan el umbral de 10KB caracteres.
The application uses team-based permissions through Appwrite Teams:
- Viewers: Can view all entities and data (default for authenticated users)
- Editors: Can create, edit, and delete entities, claims, qualifiers, and references
- Admins: Full access including admin panel and audit log viewing
Team roles:
owner/admin: Full admin permissionseditor: Edit permissions- Other roles: View-only permissions
- This starter project is designed to streamline your Next.js development with Appwrite.
- Refer to the Appwrite documentation for detailed integration guidance.