LuukOriginal
LuukOriginal
Explore posts from servers
FFilament
Created by LuukOriginal on 3/18/2025 in #❓┊help
Using a filament theme without frontend-scaffolding
Hello, I am working on an api only laravel app, for the api I am using filament manage my api. Altough did notice issues when installing a custom theme (specificaly this one https://github.com/Fa-BRAIK/dash-stack-theme). I am getting the error: "Vite manifest not found at: E:\Development\Api\public\build/manifest.json " I do have vite installed on the project, but I am not using any frontend scafholding, so I can't build the vite application to get rid of the error, what should I do? (Not sure if this would be the right place to ask?)
14 replies
DTDrizzle Team
Created by LuukOriginal on 7/12/2024 in #help
Drizzle-zod typeerror when passing in pgtable
I keep getting a type error when trying to get the zod schema from the pg schema with drizzle: public.ts
import { pgTable, timestamp, serial, text, pgEnum } from 'drizzle-orm/pg-core'

export const TeamSubscriptionTier = pgEnum('team_subscription_tier', ['basic', 'team', 'enterprise']);

export const teams = pgTable('teams', {
/**
* The auto-incrementing ID of the team.
*/
id: serial('team_id').primaryKey(),

/**
* The timestamp when the team was created.
*/
created_at: timestamp('created_at', { withTimezone: false }).defaultNow().notNull(),

/**
* The name of the team.
*/
name: text('name').notNull(),

/**
* The description of the team.
*/
description: text('description'),

/**
* The subscription tier of the team.
*/
subcription_tier: TeamSubscriptionTier('subscription_tier')
});
import { pgTable, timestamp, serial, text, pgEnum } from 'drizzle-orm/pg-core'

export const TeamSubscriptionTier = pgEnum('team_subscription_tier', ['basic', 'team', 'enterprise']);

export const teams = pgTable('teams', {
/**
* The auto-incrementing ID of the team.
*/
id: serial('team_id').primaryKey(),

/**
* The timestamp when the team was created.
*/
created_at: timestamp('created_at', { withTimezone: false }).defaultNow().notNull(),

/**
* The name of the team.
*/
name: text('name').notNull(),

/**
* The description of the team.
*/
description: text('description'),

/**
* The subscription tier of the team.
*/
subcription_tier: TeamSubscriptionTier('subscription_tier')
});
contract.ts
import { initContract } from '@ts-rest/core';
import { z } from 'zod';
import { ErrorResponseSchema } from '@bloxgrid/common/dist/schemas/error-response.schema'
import { teams } from '@bloxgrid/common/src/database/schema/public'
import { createSelectSchema } from 'drizzle-zod'

const c = initContract();

export const teamsContract = c.router({
getTeams: {
method: 'GET',
path: '/',
query: z.object({
name: z.string().optional(),
}),
responses: {
200: createSelectSchema(teams), //teams here is giving the type error
400: ErrorResponseSchema
},
summary: 'Get a list of teams',
}
}, {
pathPrefix: '/teams' as const
});
import { initContract } from '@ts-rest/core';
import { z } from 'zod';
import { ErrorResponseSchema } from '@bloxgrid/common/dist/schemas/error-response.schema'
import { teams } from '@bloxgrid/common/src/database/schema/public'
import { createSelectSchema } from 'drizzle-zod'

const c = initContract();

export const teamsContract = c.router({
getTeams: {
method: 'GET',
path: '/',
query: z.object({
name: z.string().optional(),
}),
responses: {
200: createSelectSchema(teams), //teams here is giving the type error
400: ErrorResponseSchema
},
summary: 'Get a list of teams',
}
}, {
pathPrefix: '/teams' as const
});
14 replies