├── README.md
├── .vscode
└── extensions.json
├── src
├── vite-env.d.ts
├── app.css
├── main.js
├── lib
│ └── services
│ │ └── pocketbase.js
└── App.svelte
├── svelte.config.js
├── vite.config.js
├── .gitignore
├── package.json
├── index.html
├── jsconfig.json
└── public
└── vite.svg
/README.md:
--------------------------------------------------------------------------------
1 | ## DBSeeder Docs
2 | ### Coming Soon
3 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["svelte.svelte-vscode"]
3 | }
4 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/src/app.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 | @plugin "daisyui" {
3 | themes: light --default;
4 | }
5 |
6 | ion-icon {
7 | visibility: visible !important;
8 | }
9 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import { mount } from 'svelte'
2 | import './app.css'
3 | import App from './App.svelte'
4 |
5 | const app = mount(App, {
6 | target: document.getElementById('app'),
7 | })
8 |
9 | export default app
10 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2 |
3 | export default {
4 | // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
5 | // for more information about preprocessors
6 | preprocess: vitePreprocess(),
7 | }
8 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import { svelte } from '@sveltejs/vite-plugin-svelte'
3 | import tailwindcss from '@tailwindcss/vite'
4 |
5 | // https://vite.dev/config/
6 | export default defineConfig({
7 | plugins: [svelte(), tailwindcss()],
8 | })
9 |
--------------------------------------------------------------------------------
/src/lib/services/pocketbase.js:
--------------------------------------------------------------------------------
1 | import PocketBase from "pocketbase";
2 |
3 | export default function initPocketBase(url) {
4 | try {
5 | const pb = new PocketBase(url);
6 | return pb;
7 | }
8 | catch (error) {
9 | console.error("Error initializing PocketBase:", error);
10 | return null;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dbseeder",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "preview": "vite preview"
10 | },
11 | "devDependencies": {
12 | "@sveltejs/vite-plugin-svelte": "^5.0.3",
13 | "daisyui": "^5.0.27",
14 | "svelte": "^5.23.1",
15 | "vite": "^6.3.2"
16 | },
17 | "dependencies": {
18 | "@tailwindcss/vite": "^4.1.4",
19 | "papaparse": "^5.5.2",
20 | "pocketbase": "^0.26.0",
21 | "tailwindcss": "^4.1.4"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | DbSeeder
8 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "moduleResolution": "bundler",
4 | "target": "ESNext",
5 | "module": "ESNext",
6 | /**
7 | * svelte-preprocess cannot figure out whether you have
8 | * a value or a type, so tell TypeScript to enforce using
9 | * `import type` instead of `import` for Types.
10 | */
11 | "verbatimModuleSyntax": true,
12 | "isolatedModules": true,
13 | "resolveJsonModule": true,
14 | /**
15 | * To have warnings / errors of the Svelte compiler at the
16 | * correct position, enable source maps by default.
17 | */
18 | "sourceMap": true,
19 | "esModuleInterop": true,
20 | "skipLibCheck": true,
21 | /**
22 | * Typecheck JS in `.svelte` and `.js` files by default.
23 | * Disable this if you'd like to use dynamic types.
24 | */
25 | "checkJs": true
26 | },
27 | /**
28 | * Use global.d.ts instead of compilerOptions.types
29 | * to avoid limiting type declarations.
30 | */
31 | "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
32 | }
33 |
--------------------------------------------------------------------------------
/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/App.svelte:
--------------------------------------------------------------------------------
1 |
123 |
124 |
127 |
128 |
DbSeeder
129 |
130 |
131 |
134 |
135 |
136 |
137 | Pocketbase Endpoint
138 |
139 |
150 |
151 |
152 |
153 | Authentication Token (coming soon)
154 |
155 |
165 |
166 |
167 |
175 | {#if client}
176 |
180 | {/if}
181 |
182 |
183 |
184 |
185 |
186 | Collection Name
187 |
188 |
198 |
199 |
200 |
Pick a file
201 |
214 |
215 | {#if fileData && showParseSuccess}
216 |
220 |
222 |
223 |
File parsed successfully!
224 |
225 | Make sure the headers match the collection
226 | fields
227 |
228 |
229 |
230 | {/if}
231 |
232 |
233 |
234 | {#if isWriting}
235 |
239 |
241 |
242 |
243 | Writing to Pocketbase...
244 |
245 |
246 | Please wait while we write the data to the
247 | collection.
248 |
249 | {#if totalUploads > 0}
250 |
251 | {totalUploads} records uploaded
252 |
253 | {/if}
254 |
255 |
263 |
264 | {/if}
265 | {#if errorText}
266 |
267 |
268 | {errorText}
269 |
270 | {/if}
271 | {#if successText}
272 |
273 |
275 | {successText}
276 |
277 | {/if}
278 |
279 |
280 |
294 |
307 |
308 |
309 |
310 | {#if fileData}
311 |
314 |
File Preview
315 |
316 |
319 |
320 |
321 | {#each headers as header}
322 | | {header} |
323 | {/each}
324 |
325 |
326 |
327 | {#each fileData as row}
328 |
329 | {#each headers as header}
330 | | {row[header]} |
331 | {/each}
332 |
333 | {/each}
334 |
335 |
336 |
337 |
338 | {:else}
339 |
340 |
342 |
No file selected
343 |
344 | {/if}
345 |
346 |
347 |
--------------------------------------------------------------------------------