condorhacker commited on
Commit
ee28fb0
·
verified ·
1 Parent(s): ab7b2a5

Upload 3 files

Browse files
Files changed (3) hide show
  1. tsconfig.json +29 -0
  2. types.ts +53 -0
  3. vite.config.ts +23 -0
tsconfig.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "experimentalDecorators": true,
5
+ "useDefineForClassFields": false,
6
+ "module": "ESNext",
7
+ "lib": [
8
+ "ES2022",
9
+ "DOM",
10
+ "DOM.Iterable"
11
+ ],
12
+ "skipLibCheck": true,
13
+ "types": [
14
+ "node"
15
+ ],
16
+ "moduleResolution": "bundler",
17
+ "isolatedModules": true,
18
+ "moduleDetection": "force",
19
+ "allowJs": true,
20
+ "jsx": "react-jsx",
21
+ "paths": {
22
+ "@/*": [
23
+ "./*"
24
+ ]
25
+ },
26
+ "allowImportingTsExtensions": true,
27
+ "noEmit": true
28
+ }
29
+ }
types.ts ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ export enum FamilyMember {
3
+ PAPA = 'Papà',
4
+ MAMMA = 'Mamma',
5
+ FIGLIO_GRANDE = 'Figlio grande',
6
+ FIGLIA = 'Figlia',
7
+ NONNI = 'Nonni',
8
+ TUTTI = 'Tutti',
9
+ OSPITI = 'Ospiti'
10
+ }
11
+
12
+ export interface UserProfile {
13
+ id: string;
14
+ name: FamilyMember;
15
+ color: string;
16
+ profile: string;
17
+ }
18
+
19
+ export interface Transaction {
20
+ id: string;
21
+ date: string;
22
+ amount: number;
23
+ category: string;
24
+ subcategory?: string;
25
+ payer: FamilyMember;
26
+ description: string;
27
+ type: 'INCOME' | 'EXPENSE';
28
+ }
29
+
30
+ export interface CalendarEvent {
31
+ id: string;
32
+ title: string;
33
+ start: string;
34
+ end: string;
35
+ location?: string;
36
+ participants: FamilyMember[];
37
+ weatherForecast?: string;
38
+ }
39
+
40
+ export interface SmartNote {
41
+ id: string;
42
+ title: string;
43
+ content: string;
44
+ category: string;
45
+ lastModified: string;
46
+ linkedTransactionId?: string;
47
+ }
48
+
49
+ export interface ChatMessage {
50
+ role: 'user' | 'assistant';
51
+ content: string;
52
+ timestamp: string;
53
+ }
vite.config.ts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import path from 'path';
2
+ import { defineConfig, loadEnv } from 'vite';
3
+ import react from '@vitejs/plugin-react';
4
+
5
+ export default defineConfig(({ mode }) => {
6
+ const env = loadEnv(mode, '.', '');
7
+ return {
8
+ server: {
9
+ port: 3000,
10
+ host: '0.0.0.0',
11
+ },
12
+ plugins: [react()],
13
+ define: {
14
+ 'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
15
+ 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
16
+ },
17
+ resolve: {
18
+ alias: {
19
+ '@': path.resolve(__dirname, '.'),
20
+ }
21
+ }
22
+ };
23
+ });