-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproject-source-code.txt
6407 lines (5651 loc) · 206 KB
/
project-source-code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<summary>
<header>
Repopack Output File
This file was generated by Repopack on: 2024-08-19T00:31:52.498Z
</header>
<purpose>
This file contains a packed representation of the entire repository's contents.
It is designed to be easily consumable by AI systems for analysis, code review,
or other automated processes.
</purpose>
<file_format>
The content is organized as follows:
1. This summary section
2. Repository structure
3. Repository files, each consisting of:
- File path as an attribute
- Full contents of the file
</file_format>
<usage_guidelines>
1. This file should be treated as read-only. Any changes should be made to the
original repository files, not this packed version.
2. When processing this file, use the file path attributes to distinguish
between different files in the repository.
3. Be aware that this file may contain sensitive information. Handle it with
the same level of security as you would the original repository.
</usage_guidelines>
<notes>
- Some files may have been excluded based on .gitignore rules and Repopack's
configuration.
- Binary files are not included in this packed representation.
</notes>
<additional_info>
For more information about Repopack, visit: https://github.com/yamadashy/repopack
</additional_info>
</summary>
<repository_structure>
.aidigestignore
.gitignore
.npmrc
.repopackignore
apps/backend/.eslintrc.js
apps/backend/.prettierrc
apps/backend/drizzle.config.ts
apps/backend/nest-cli.json
apps/backend/package.json
apps/backend/README.md
apps/backend/src/app.controller.spec.ts
apps/backend/src/app.controller.ts
apps/backend/src/app.module.ts
apps/backend/src/app.service.ts
apps/backend/src/auth/auth.controller.ts
apps/backend/src/auth/auth.module.ts
apps/backend/src/auth/auth.service.ts
apps/backend/src/auth/strategies/jwt.tstrategy.ts
apps/backend/src/auth/strategies/SessionSerializer.ts
apps/backend/src/auth/strategies/telegram.strategy.ts
apps/backend/src/auth/utils/authenticated.guard.ts
apps/backend/src/auth/utils/telegram.guard.ts
apps/backend/src/blockchain/solana/sniper/autoSell/entryCalculation.service.ts
apps/backend/src/blockchain/solana/sniper/autoSell/transactionExecution.service.ts
apps/backend/src/blockchain/solana/sniper/pricePooling.service.ts
apps/backend/src/blockchain/solana/sniper/solanaSniper.module.ts
apps/backend/src/blockchain/solana/solana.controller.ts
apps/backend/src/blockchain/solana/solana.module.ts
apps/backend/src/blockchain/solana/solana.service.ts
apps/backend/src/blockchain/solana/token/solanaToken.controller.ts
apps/backend/src/blockchain/solana/token/solanaToken.module.ts
apps/backend/src/blockchain/solana/token/solanaToken.service.spec.ts
apps/backend/src/blockchain/solana/token/solanaToken.service.ts
apps/backend/src/common/helpers/convertDexscreenerData.ts
apps/backend/src/common/helpers/getSignature.ts
apps/backend/src/common/helpers/sleep.ts
apps/backend/src/common/helpers/transactionSender.ts
apps/backend/src/common/interfaces/blockchain.interface.ts
apps/backend/src/common/interfaces/dexscreenerData.interface.ts
apps/backend/src/common/interfaces/user.interface.ts
apps/backend/src/drizzle/drizzle.module.ts
apps/backend/src/drizzle/drizzle.provider.ts
apps/backend/src/drizzle/schema.ts
apps/backend/src/encryption/encryption.module.ts
apps/backend/src/encryption/encryption.service.ts
apps/backend/src/main.ts
apps/backend/src/user/user.controller.ts
apps/backend/src/user/user.module.ts
apps/backend/src/user/user.service.ts
apps/backend/test/app.e2e-spec.ts
apps/backend/test/jest-e2e.json
apps/backend/transactions.json
apps/backend/tsconfig.build.json
apps/backend/tsconfig.json
apps/frontend/.gitignore
apps/frontend/.prettierignore
apps/frontend/.prettierrc
apps/frontend/eslint.config.js
apps/frontend/package.json
apps/frontend/playwright.config.ts
apps/frontend/postcss.config.js
apps/frontend/README.md
apps/frontend/src/app.css
apps/frontend/src/app.d.ts
apps/frontend/src/app.html
apps/frontend/src/components/common/BottomNavigation.svelte
apps/frontend/src/components/common/CopyToClipboard.svelte
apps/frontend/src/components/common/Navbar.svelte
apps/frontend/src/components/common/NumberInput.svelte
apps/frontend/src/components/TelegramLoginWidget.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/AutoSell.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/grid/GridAutoSellStrategy.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/presets/AutoSellPresetItem.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/presets/AutoSellPresets.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/presets/SaveAutoSellPreset.svelte
apps/frontend/src/components/trade/buy_tab/auto_sell/simple/SimpleAutoSellStrategy.svelte
apps/frontend/src/components/trade/buy_tab/BuyTab.svelte
apps/frontend/src/components/trade/buy_tab/SwapInput.svelte
apps/frontend/src/components/trade/sell_tab/SellTab.svelte
apps/frontend/src/components/trade/shared/TokenFetcherInput.svelte
apps/frontend/src/components/trade/shared/TokenInformationModal.svelte
apps/frontend/src/components/trade/shared/TransactionSettings.svelte
apps/frontend/src/components/trade/shared/WalletSelector.svelte
apps/frontend/src/components/trade/TradeForm.svelte
apps/frontend/src/hooks.server.ts
apps/frontend/src/index.test.ts
apps/frontend/src/lib/api.ts
apps/frontend/src/lib/autoSellPresets.ts
apps/frontend/src/lib/index.ts
apps/frontend/src/lib/presetUtils.ts
apps/frontend/src/routes/+layout.svelte
apps/frontend/src/routes/+page.svelte
apps/frontend/src/routes/dashboard/+layout.server.ts
apps/frontend/src/routes/dashboard/+layout.svelte
apps/frontend/src/routes/dashboard/+page.svelte
apps/frontend/src/routes/dashboard/trade/+page.svelte
apps/frontend/src/routes/login/+page.svelte
apps/frontend/src/services/priceUpdateService.ts
apps/frontend/src/services/tokenService.ts
apps/frontend/src/services/tradingService.ts
apps/frontend/src/services/userService.ts
apps/frontend/src/stores/formStore.ts
apps/frontend/src/stores/loadingStore.ts
apps/frontend/src/stores/priceStore.ts
apps/frontend/src/stores/tokenStore.ts
apps/frontend/src/stores/userStore.ts
apps/frontend/src/types/BuyTokenForm.interface.ts
apps/frontend/src/types/global.d.ts
apps/frontend/src/utils/copyToClipboard.ts
apps/frontend/src/utils/formatters.ts
apps/frontend/svelte.config.js
apps/frontend/tailwind.config.js
apps/frontend/tests/test.ts
apps/frontend/tsconfig.json
apps/frontend/vite.config.ts
package.json
packages/shared-types/package.json
packages/shared-types/src/autoSell.interface.ts
packages/shared-types/src/drizzle.types.ts
packages/shared-types/src/dto/BuyToken.dto.ts
packages/shared-types/src/dto/SellToken.dto.ts
packages/shared-types/src/JupiterPriceResponse.interface.ts
packages/shared-types/src/TelegramAuthData.interface.ts
packages/shared-types/src/tokenInfo.interface.ts
packages/shared-types/src/userInfo.interface.ts
packages/shared-types/src/zodSchemas/BuyTokenFormSchema.ts
packages/shared-types/tsconfig.json
README.md
tsconfig.json
</repository_structure>
<repository_files>
<file path=".aidigestignore">
.svelte-kit
dist
migrations
solana_listener
example_data
static
node_modules
</file>
<file path=".gitignore">
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Nest.JS build output
dist/
# Drizzle migrations output
migrations/
</file>
<file path=".npmrc">
engine-strict=true
</file>
<file path=".repopackignore">
.svelte-kit
dist
migrations
solana_listener
example_data
static
node_modules
</file>
<file path="package.json">
{
"name": "solana-trading-bot-workspace",
"private": true,
"scripts": {
"build:shared-types": "tsc --project packages/shared-types",
"prestart": "npm run build:shared-types",
"start": "npm run start --workspace=backend",
"predev": "npm run build:shared-types",
"dev": "concurrently \"npm run dev --workspace=backend\" \"npm run dev --workspace=frontend\""
},
"workspaces": [
"apps/*",
"packages/*"
],
"packageManager": "[email protected]+sha512.831cf4c5f8b8374af71521d4d153db49d7086de615c2af7cb5e9d7eb8ba630ddac46fea495d643e552ef2e68a3aa99a3e5e9fbee8696702967504df5c59cb273",
"dependencies": {
"valibot": "^0.37.0"
}
}
</file>
<file path="README.md">
# solana_trading_bot
</file>
<file path="tsconfig.json">
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"shared-types": ["packages/shared-types/src"]
}
},
"include": ["apps/**/*", "packages/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
}
</file>
<file path="apps/backend/.eslintrc.js">
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': ['error', { endOfLine: 'auto' }],
},
};
</file>
<file path="apps/backend/.prettierrc">
{
"tabWidth": 3,
"semi": false,
"singleQuote": true,
"printWidth": 150
}
</file>
<file path="apps/backend/drizzle.config.ts">
import { config } from 'dotenv'
import { defineConfig } from 'drizzle-kit'
config({ path: '.env' })
export default defineConfig({
schema: './src/drizzle/schema.ts',
out: './src/drizzle/migrations',
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
})
</file>
<file path="apps/backend/nest-cli.json">
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
},
"entryFile": "apps/backend/src/main.js"
}
</file>
<file path="apps/backend/package.json">
{
"name": "backend",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"packageManager": "[email protected]",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"migrate": "npx drizzle-kit generate && npx drizzle-kit migrate"
},
"dependencies": {
"@metaplex-foundation/mpl-token-metadata": "^3.2.1",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/event-emitter": "^2.0.4",
"@nestjs/jwt": "^10.2.0",
"@nestjs/mapped-types": "*",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.10",
"@nestjs/schedule": "^4.1.0",
"@solana/spl-token": "^0.4.8",
"@solana/web3.js": "^1.95.0",
"@supabase/supabase-js": "^2.44.3",
"axios": "^1.7.3",
"bcrypt": "^5.1.1",
"bignumber.js": "^9.1.2",
"bs58": "^4.0.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.31.4",
"express-session": "^1.18.0",
"moment": "^2.30.1",
"passport": "^0.7.0",
"passport-custom": "^1.1.1",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"postgres": "^3.4.4",
"promise-retry": "^2.0.1",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"shared-types": "^1.0.0",
"uuid": "^10.0.0",
"valibot": "^0.37.0"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/express-session": "^1.18.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"drizzle-kit": "^0.23.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
</file>
<file path="apps/backend/README.md">
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
## Installation
```bash
$ npm install
```
## Running the app
```bash
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
```
## Test
```bash
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
```
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
## Stay in touch
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)
## License
Nest is [MIT licensed](LICENSE).
</file>
<file path="apps/backend/transactions.json">
[]
</file>
<file path="apps/backend/tsconfig.build.json">
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}
</file>
<file path="apps/backend/tsconfig.json">
{
// "extends": "../../tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false,
"paths": {
"shared-types/*": ["../../packages/shared-types/src/*"]
}
}
}
</file>
<file path="apps/frontend/.gitignore">
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
</file>
<file path="apps/frontend/.prettierignore">
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
</file>
<file path="apps/frontend/.prettierrc">
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 120,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
</file>
<file path="apps/frontend/eslint.config.js">
import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
];
</file>
<file path="apps/frontend/package.json">
{
"name": "frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "cross-env HOST=custom.domain vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^9.6.0",
"@types/lodash": "^4.17.7",
"@types/node": "^22.1.0",
"autoprefixer": "^10.4.19",
"cross-env": "^7.0.3",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"flowbite-svelte-icons": "^1.6.1",
"globals": "^15.0.0",
"postcss": "^8.4.40",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"sveltekit-superforms": "^2.16.1",
"tailwindcss": "^3.4.7",
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.0.3",
"vitest": "^2.0.0",
"zod": "^3.23.8"
},
"type": "module",
"dependencies": {
"axios": "^1.7.2",
"flowbite": "^2.4.1",
"flowbite-svelte": "^0.46.15",
"lodash": "^4.17.21",
"lucide-svelte": "^0.424.0",
"shared-types": "^1.0.0",
"svelte-french-toast": "^1.2.0"
}
}
</file>
<file path="apps/frontend/playwright.config.ts">
import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
};
export default config;
</file>
<file path="apps/frontend/postcss.config.js">
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
</file>
<file path="apps/frontend/README.md">
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
</file>
<file path="apps/frontend/svelte.config.js">
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
alias: {
$services: './src/services',
$components: './src/components',
$stores: './src/stores',
$utils: './src/utils',
$schemas: './src/schemas'
}
}
};
export default config;
</file>
<file path="apps/frontend/tailwind.config.js">
import flowbitePlugin from 'flowbite/plugin';
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./src/**/*.{html,js,svelte,ts}',
'../../node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'
],
darkMode: 'selector',
theme: {
extend: {
colors: {
// flowbite-svelte
primary: {
50: '#FFF5F2',
100: '#FFF1EE',
200: '#FFE4DE',
300: '#FFD5CC',
400: '#FFBCAD',
500: '#FE795D',
600: '#EF562F',
700: '#EB4F27',
800: '#CC4522',
900: '#A5371B'
}
}
}
},
plugins: [flowbitePlugin]
};
</file>
<file path="apps/frontend/tsconfig.json">
{
"extends": ["./.svelte-kit/tsconfig.json"],
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
},
"include": [
"./.svelte-kit/ambient.d.ts",
"./.svelte-kit/non-ambient.d.ts",
"./.svelte-kit/types/**/$types.d.ts",
"vite.config.js",
"vite.config.ts",
"./src/**/*.js",
"./src/**/*.ts",
"./src/**/*.svelte",
"./tests/**/*.js",
"./tests/**/*.ts",
"./tests/**/*.svelte"
],
"exclude": [
"**/node_modules/**",
"./src/service-worker.js",
"./src/service-worker.ts",
"./src/service-worker.d.ts",
"../../packages/**/node_modules/**"
]
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
</file>
<file path="apps/frontend/vite.config.ts">
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
server: {
host: 'example.com',
port: 80
}
});
</file>
<file path="packages/shared-types/package.json">
{
"name": "shared-types",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"backend": "^0.0.1",
"drizzle-orm": "^0.32.2",
"postgres": "^3.4.4",
"typescript": "^5.5.4",
"valibot": "^0.37.0"
}
}
</file>
<file path="packages/shared-types/tsconfig.json">
{
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "dist",
"rootDir": "src",
"strict": true
},
"include": ["src"]
}
</file>
<file path="apps/backend/test/app.e2e-spec.ts">
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication;
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});