Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
f6f2d94
feat: multi-terminology support [wip].
ItzNotABug Sep 28, 2025
3fae9d6
update: restructure dirs.
ItzNotABug Sep 29, 2025
bc16dea
update: abstracted indexes for base views.
ItzNotABug Sep 29, 2025
cd5c781
remove: duplicate components.
ItzNotABug Sep 29, 2025
e451f18
Merge branch 'index-suggestions' into 'multiple-terminologies'.
ItzNotABug Sep 30, 2025
a3eb1c8
fix: import.
ItzNotABug Sep 30, 2025
5eca86e
update: imports and folder structure.
ItzNotABug Sep 30, 2025
aca5241
lint.
ItzNotABug Sep 30, 2025
88a153e
Merge branch 'main' into multiple-terminologies
ItzNotABug Sep 30, 2025
d00e280
misc: changes, docs update, svelte5 migration.
ItzNotABug Sep 30, 2025
7410780
Merge branch 'main' into 'multiple-terminologies'.
ItzNotABug Oct 3, 2025
8f5f4c1
simplify.
ItzNotABug Oct 3, 2025
645ae62
update: migrate empty sheet as a reusable component.
ItzNotABug Oct 3, 2025
6cecb2c
lint.
ItzNotABug Oct 3, 2025
4354c90
update: misc, address a todo.
ItzNotABug Oct 3, 2025
e87894d
update: make breadcrumbs and header reusable.
ItzNotABug Oct 3, 2025
ef7d6d4
update: improved context and terminology sharing.
ItzNotABug Oct 3, 2025
d2c2870
lint.
ItzNotABug Oct 3, 2025
d5afa9b
remove: leftover log
ItzNotABug Oct 5, 2025
466cc8d
address: todo.
ItzNotABug Oct 7, 2025
31aa0ff
address: todo for `trackError`.
ItzNotABug Oct 7, 2025
e1aa598
fixes, stricter params.
ItzNotABug Oct 7, 2025
74e6eae
fixes, stricter params.
ItzNotABug Oct 7, 2025
e06980a
fix: `getContext` undefined issue.
ItzNotABug Oct 7, 2025
95bbe56
update: resizing on indexes.
ItzNotABug Oct 7, 2025
4288215
fix: accessor.
ItzNotABug Oct 7, 2025
a871810
fix: slash issues on routes causing flawed selection on tabs.
ItzNotABug Oct 7, 2025
470a4e1
Merge branch 'main' into 'multiple-terminologies'.
ItzNotABug Oct 7, 2025
7d7dfab
use: `creatingEntity`.
ItzNotABug Oct 7, 2025
fc78c44
remove: legacy logic.
ItzNotABug Oct 7, 2025
6fef9a2
update: proper type.
ItzNotABug Oct 7, 2025
4ef68a4
update: migrate.
ItzNotABug Oct 9, 2025
2ce3811
remove: database derived store.
ItzNotABug Oct 9, 2025
db8420d
address comments, fix nav bug.
ItzNotABug Oct 9, 2025
aea5e82
misc.
ItzNotABug Oct 9, 2025
2abb2bc
address comment with hardcoded paths for `nonSheetPages` checks.
ItzNotABug Oct 9, 2025
9d1f4ce
misc: fixes.
ItzNotABug Oct 9, 2025
ea665d7
misc: fixes.
ItzNotABug Oct 9, 2025
8a449d5
update: moreee changes!
ItzNotABug Oct 9, 2025
43eff98
feat: wrapped sdk support.
ItzNotABug Oct 10, 2025
e97ef6c
bump: sdk for `DocumentsDB`.
ItzNotABug Oct 10, 2025
f0d1a5d
update: sdks side updates.
ItzNotABug Oct 10, 2025
f49f888
update: sdks side updates.
ItzNotABug Oct 10, 2025
1f254a6
address comments.
ItzNotABug Oct 10, 2025
604f0ab
Merge branch 'main' into multiple-terminologies
ItzNotABug Oct 10, 2025
d53c8ef
fix: add fallback.
ItzNotABug Oct 10, 2025
ae9aa07
fix: infy-loop
ItzNotABug Oct 10, 2025
0e7938a
fix: `$derived` overuse.
ItzNotABug Oct 10, 2025
222eb9a
fix: relationships.
ItzNotABug Oct 11, 2025
7c4c256
address: pending todo.
ItzNotABug Oct 13, 2025
83a8870
address rabbits comment.
ItzNotABug Oct 13, 2025
f1712be
address rabbits comment.
ItzNotABug Oct 13, 2025
7a4f9a9
Merge branch 'main' into 'multiple-terminologies'.
ItzNotABug Oct 16, 2025
220dc97
Merge branch 'main' into 'multiple-terminologies'.
ItzNotABug Dec 30, 2025
1eea12f
updates: misc.
ItzNotABug Dec 30, 2025
26871a8
fix: realtime todo.
ItzNotABug Dec 30, 2025
98aa860
Merge branch 'main' into 'multiple-terminologies'.
ItzNotABug Jan 8, 2026
e1b0f33
bump: sdk.
ItzNotABug Jan 8, 2026
dfc68c9
Merge branch 'main' into multiple-terminologies
ItzNotABug Jan 8, 2026
58a661b
fix: sample data gen issue.
ItzNotABug Jan 8, 2026
aa2e4a9
fix: sample data gen issue.
ItzNotABug Jan 8, 2026
e00c7e3
fix: misc.
ItzNotABug Jan 8, 2026
c022968
misc: fixes.
ItzNotABug Jan 9, 2026
5f77671
address comments.
ItzNotABug Jan 9, 2026
b0bf766
remove: file.
ItzNotABug Jan 9, 2026
36e76a2
Merge branch 'main' into multiple-terminologies
ItzNotABug Jan 9, 2026
ab12231
Merge pull request #2413 from appwrite/multiple-terminologies
ItzNotABug Jan 9, 2026
7540ab2
Merge branch 'main' into 8.x
ItzNotABug Jan 12, 2026
9d1cc5c
address comments.
ItzNotABug Jan 13, 2026
3271931
Merge branch 'main' into 8.x
ItzNotABug Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@9c55755",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@e621876",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bbad65f",
"@appwrite.io/pink-legacy": "^1.0.3",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const analytics = Analytics({
});

export function trackEvent(name: string, data: object = null): void {
if (!isTrackingAllowed()) {
if (!name || !isTrackingAllowed()) {
return;
}

Expand All @@ -76,7 +76,7 @@ export function trackEvent(name: string, data: object = null): void {
}

export function trackError(exception: Error, event: Submit): void {
if (exception instanceof AppwriteException && exception.type) {
if (exception instanceof AppwriteException && exception.type && event) {
trackEvent(Submit.Error, {
type: exception.type,
form: event
Expand Down Expand Up @@ -148,11 +148,14 @@ export enum Click {
ConnectRepositoryClick = 'click_connect_repository',
CreditsRedeemClick = 'click_credits_redeem',
CloudSignupClick = 'click_cloud_signup',

DatabaseColumnDelete = 'click_column_delete',
DatabaseIndexDelete = 'click_index_delete',
DatabaseTableDelete = 'click_table_delete',
DatabaseRowDelete = 'click_row_delete',
DatabaseDatabaseDelete = 'click_database_delete',
DatabaseImportCsv = 'click_database_import_csv',

DomainCreateClick = 'click_domain_create',
DomainDeleteClick = 'click_domain_delete',
DomainRetryDomainVerificationClick = 'click_domain_retry_domain_verification',
Expand Down Expand Up @@ -279,6 +282,7 @@ export enum Submit {
DatabaseUpdateName = 'submit_database_update_name',
DatabaseImportCsv = 'submit_database_import_csv',
DatabaseBackupDelete = 'submit_database_backup_delete',
DatabaseBackupPolicyCreate = 'submit_database_backup_policy_create',

ColumnCreate = 'submit_column_create',
ColumnUpdate = 'submit_column_update',
Expand All @@ -289,15 +293,18 @@ export enum Submit {
RowDelete = 'submit_row_delete',
RowUpdate = 'submit_row_update',
RowUpdatePermissions = 'submit_row_update_permissions',

IndexCreate = 'submit_index_create',
IndexDelete = 'submit_index_delete',
TableCreate = 'submit_row_create',
TableDelete = 'submit_row_delete',
TableUpdateName = 'submit_row_update_name',
TableUpdatePermissions = 'submit_row_update_permissions',
TableUpdateSecurity = 'submit_row_update_security',
TableUpdateEnabled = 'submit_row_update_enabled',
TableUpdateDisplayNames = 'submit_row_update_display_names',

TableCreate = 'submit_table_create',
TableDelete = 'submit_table_delete',
TableUpdateName = 'submit_table_update_name',
TableUpdatePermissions = 'submit_table_update_permissions',
TableUpdateSecurity = 'submit_table_update_security',
TableUpdateEnabled = 'submit_table_update_enabled',
TableUpdateDisplayNames = 'submit_table_update_display_names',

FunctionCreate = 'submit_function_create',
FunctionDelete = 'submit_function_delete',
FunctionUpdateName = 'submit_function_update_name',
Expand Down
15 changes: 8 additions & 7 deletions src/lib/components/backupRestoreBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@
}

function updateOrAddItem(payload: Payload) {
// todo: @itznotabug - might need a change to $table?
const { $id, status, $collection, policyId } = payload;
if ($collection === 'archives' && policyId !== null) {
// the internal structure still uses `$collection`,
// and is basically an identifier of the op. type here!
const { $id, status, $collection: type, policyId } = payload;
if (type === 'archives' && policyId !== null) {
return;
}

if ($collection in backupRestoreItems) {
const collectionMap = backupRestoreItems[$collection];
if (type in backupRestoreItems) {
const collectionMap = backupRestoreItems[type];

if (collectionMap.has($id)) {
collectionMap.get($id).status = status;
if (status === 'completed') {
invalidate(Dependencies.BACKUPS);

if ($collection === 'restorations') {
if (type === 'restorations') {
const { newId, newName } =
collectionMap.get($id).options?.['databases']?.['database'][0] || {};

Expand All @@ -81,7 +82,7 @@
} else if (status === 'pending' || status === 'processing' || status === 'uploading') {
collectionMap.set($id, payload);
}
backupRestoreItems[$collection] = collectionMap;
backupRestoreItems[type] = collectionMap;
}
}

Expand Down
165 changes: 90 additions & 75 deletions src/lib/helpers/faker.ts
Original file line number Diff line number Diff line change
@@ -1,79 +1,96 @@
import { sdk } from '$lib/stores/sdk';
import { faker } from '@faker-js/faker';
import type { Columns } from '$routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/store';
import type { NestedNumberArray } from './types';
import { ID, type Models } from '@appwrite.io/console';
import { sdk } from '$lib/stores/sdk';
import { isWithinSafeRange } from '$lib/helpers/numbers';
import type { NestedNumberArray } from './types';
import type { DatabaseType, Field } from '$database/(entity)';

export async function generateColumns(
export async function generateFields(
project: Models.Project,
databaseId: string,
tableId: string
): Promise<Columns[]> {
tableId: string,
databaseType: DatabaseType
): Promise<Field[]> {
const client = sdk.forProject(project.region, project.$id);

return await Promise.all([
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'name',
size: 255,
required: false
}),
client.tablesDB.createEmailColumn({ databaseId, tableId, key: 'email', required: false }),
client.tablesDB.createIntegerColumn({
databaseId,
tableId,
key: 'age',
required: false,
min: 18,
max: 80
}),
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'city',
size: 100,
required: false
}),
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'description',
size: 1000,
required: false
}),
client.tablesDB.createBooleanColumn({
databaseId,
tableId,
key: 'active',
required: false
}),
client.tablesDB.createPointColumn({
databaseId,
tableId,
key: 'location',
required: false
}),
client.tablesDB.createLineColumn({
databaseId,
tableId,
key: 'route',
required: false
})
]);
switch (databaseType) {
case 'legacy':
case 'tablesdb': {
return await Promise.all([
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'name',
size: 255,
required: false
}),
client.tablesDB.createEmailColumn({
databaseId,
tableId,
key: 'email',
required: false
}),
client.tablesDB.createIntegerColumn({
databaseId,
tableId,
key: 'age',
required: false,
min: 18,
max: 80
}),
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'city',
size: 100,
required: false
}),
client.tablesDB.createStringColumn({
databaseId,
tableId,
key: 'description',
size: 1000,
required: false
}),
client.tablesDB.createBooleanColumn({
databaseId,
tableId,
key: 'active',
required: false
}),
client.tablesDB.createPointColumn({
databaseId,
tableId,
key: 'location',
required: false
}),
client.tablesDB.createLineColumn({
databaseId,
tableId,
key: 'route',
required: false
})
]);
}

case 'documentsdb': /* doesn't need any fields */
case 'vectordb': /* vector embeddings + metadata defined at collection creation */ {
/* no individual field creation needed */
return [];
}
}
}

export function generateFakeRecords(
columns: Columns[],
fields: Field[],
count: number
): {
ids: string[];
rows: Models.Row[];
} {
if (count <= 0) return { ids: [], rows: [] };

const filteredColumns = columns.filter(
const filteredColumns = fields.filter(
(col) => col.type !== 'relationship' && col.status === 'available'
);

Expand Down Expand Up @@ -108,7 +125,7 @@ export function generateFakeRecords(
};
} else {
for (const column of filteredColumns) {
row[column.key] = generateValueForColumn(column);
row[column.key] = generateValueForField(column);
}
}

Expand Down Expand Up @@ -140,15 +157,15 @@ function generateStringValue(key: string, maxLength: number): string {
return text.length <= maxLength ? text : text.substring(0, maxLength);
}

function generateValueForColumn(
column: Columns
function generateValueForField(
field: Field
): string | number | boolean | null | Array<string | number | boolean | NestedNumberArray> {
if (column.array) {
if (field.array) {
const arraySize = faker.number.int({ min: 1, max: 5 });
const items: Array<string | number | NestedNumberArray | boolean> = [];

for (let i = 0; i < arraySize; i++) {
const itemAttribute = { ...column, array: false };
const itemAttribute = { ...field, array: false };
const item = generateSingleValue(itemAttribute);
if (item !== null) {
items.push(item);
Expand All @@ -158,16 +175,14 @@ function generateValueForColumn(
return items;
}

return generateSingleValue(column);
return generateSingleValue(field);
}

function generateSingleValue(
column: Columns
): string | number | boolean | NestedNumberArray | null {
switch (column.type) {
function generateSingleValue(field: Field): string | number | boolean | NestedNumberArray | null {
switch (field.type) {
case 'string': {
if ('format' in column && column.format) {
switch (column.format) {
if ('format' in field && field.format) {
switch (field.format) {
case 'email': {
return faker.internet.email();
}
Expand All @@ -181,7 +196,7 @@ function generateSingleValue(
}

case 'enum': {
const enumAttr = column as Models.ColumnEnum;
const enumAttr = field as Models.ColumnEnum;
if (enumAttr.elements?.length > 0) {
return faker.helpers.arrayElement(enumAttr.elements);
}
Expand All @@ -190,14 +205,14 @@ function generateSingleValue(
}
return '';
} else {
const stringAttr = column as Models.ColumnString;
const stringAttr = field as Models.ColumnString;
const maxLength = Math.min(stringAttr.size ?? 255, 1000);
return generateStringValue(column.key, maxLength);
return generateStringValue(field.key, maxLength);
}
}

case 'integer': {
const intAttr = column as Models.ColumnInteger;
const intAttr = field as Models.ColumnInteger;
const min = isWithinSafeRange(intAttr.min) ? intAttr.min : 0;
const fallbackMax = Math.max(min + 100, 100);
const max = isWithinSafeRange(intAttr.max)
Expand All @@ -207,7 +222,7 @@ function generateSingleValue(
}

case 'double': {
const floatAttr = column as Models.ColumnFloat;
const floatAttr = field as Models.ColumnFloat;
const min = isWithinSafeRange(floatAttr.min) ? floatAttr.min : 0;
const fallbackMax = Math.max(min + 100, 100);
const max = isWithinSafeRange(floatAttr.max)
Expand Down
Loading