Skip to content

Commit 70a0c74

Browse files
committed
removed providers in favor of services
1 parent 4f38b4a commit 70a0c74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+413
-212
lines changed

.env.example

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
# API
12
ORIGIN=http://localhost:5173
23

34
# Database
45
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
5-
REDIS_URL=redis://localhost:6379
6+
7+
# Redis
8+
REDIS_URL=redis://localhost:6379
9+
10+
# Storage
11+
PUBLIC_IMAGE_URI=http://localhost:9000/dev
12+
STORAGE_BUCKET=dev
13+
STORAGE_URL=http://localhost:9000
14+
STORAGE_ACCESS_KEY=user
15+
STORAGE_SECRET_KEY=password

drizzle.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Config } from 'drizzle-kit';
22

33
export default {
4-
out: './src/lib/server/api/databases/migrations',
5-
schema: './src/lib/server/api/databases/tables/*.table.ts',
4+
out: './src/lib/server/api/databases/postgres/migrations',
5+
schema: './src/lib/server/api/databases/postgres/tables/*.table.ts',
66
breakpoints: false,
77
strict: true,
88
dialect: 'postgresql',

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
"mode-watcher": "^0.4.1",
8888
"paneforge": "^0.0.5",
8989
"rate-limit-redis": "^4.2.0",
90+
"redis": "^4.7.0",
91+
"redis-om": "^0.4.6",
9092
"resend": "^3.5.0",
9193
"svelte-sonner": "^0.3.27",
9294
"tailwind-merge": "^2.4.0",

pnpm-lock.yaml

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import * as envs from '$env/static/private';
2+
import type { Config } from './types/config.type';
3+
4+
export const config: Config = {
5+
isProduction: envs.NODE_ENV === 'production',
6+
api: {
7+
origin: envs.ORIGIN,
8+
},
9+
storage: {
10+
accessKey: envs.STORAGE_ACCESS_KEY,
11+
secretKey: envs.STORAGE_SECRET_KEY,
12+
bucket: envs.STORAGE_BUCKET,
13+
url: envs.STORAGE_URL
14+
},
15+
postgres: {
16+
url: envs.DATABASE_URL
17+
},
18+
redis: {
19+
url: envs.REDIS_URL
20+
}
21+
}
22+

src/lib/server/api/common/inferfaces/repository.interface.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export abstract class AsyncService {
2+
async init(): Promise<void> { }
3+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export interface Config {
2+
isProduction: boolean;
3+
api: ApiConfig;
4+
storage: StorageConfig;
5+
redis: RedisConfig;
6+
postgres: PostgresConfig;
7+
}
8+
9+
interface ApiConfig {
10+
origin: string;
11+
}
12+
13+
interface StorageConfig {
14+
accessKey: string;
15+
secretKey: string;
16+
bucket: string;
17+
url: string;
18+
}
19+
20+
interface RedisConfig {
21+
url: string;
22+
}
23+
24+
interface PostgresConfig {
25+
url: string;
26+
}

src/lib/server/api/common/classes/controller.class.ts renamed to src/lib/server/api/common/types/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Hono } from "hono";
2-
import type { HonoTypes } from "../types/hono.type";
3-
import type { BlankSchema, Env, Schema } from "hono/types";
2+
import type { HonoTypes } from "./hono";
3+
import type { BlankSchema } from "hono/types";
44

55
export abstract class Controler {
66
protected readonly controller: Hono<HonoTypes, BlankSchema, '/'>;
File renamed without changes.

0 commit comments

Comments
 (0)