Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
be7b65c
feat: add deep link support
sosweetham Jul 28, 2025
6bfabd6
fix: remove db/data
sosweetham Jul 28, 2025
cd95f30
fix: add db/data to gitignore
sosweetham Jul 28, 2025
6f2e842
fix: remove useless comment
sosweetham Jul 28, 2025
f016b45
feat: wallet deep link logic
sosweetham Jul 28, 2025
ab6e5fc
fix: remove useless comments
sosweetham Jul 28, 2025
4aed735
merge: main
sosweetham Jul 29, 2025
fbe3d7a
fix: lock file
sosweetham Jul 29, 2025
2774776
fix: add files
sosweetham Jul 29, 2025
324a677
chore: merge conflict.
Sahil2004 Jul 29, 2025
1492207
chore: formatting fixed.
Sahil2004 Jul 29, 2025
37af899
chore: lint fixed.
Sahil2004 Jul 29, 2025
ac7caa0
chore: fixed nested onMount conflict.
Sahil2004 Jul 30, 2025
366fc48
chore: fixed duplicate handleFinalSubmit function definitions.
Sahil2004 Jul 30, 2025
3104822
chore: formatting.
Sahil2004 Jul 30, 2025
731db6b
fix: Improve URL parsing and error handling for deep links.
Sahil2004 Jul 30, 2025
646c9be
chore: formatting.
Sahil2004 Jul 30, 2025
28b6a3a
fix: Conditional scanning start based on deep link presence.
Sahil2004 Jul 30, 2025
0b3a0b1
fix: Security concern: Hardcoded session ID in test file.
Sahil2004 Jul 30, 2025
a01e90e
fix: Add input validation and sanitization for deep link parameters.
Sahil2004 Jul 30, 2025
053dd99
fix: Critical: Missing error handling for URL constructor.
Sahil2004 Jul 30, 2025
e8a4afb
fix: Critical: Inverted domain validation logic.
Sahil2004 Jul 30, 2025
f5a5716
fix: Refactor complex deep link parsing logic.
Sahil2004 Jul 30, 2025
ddd40be
Merge platforms (#270)
grv-saini-20 Jul 30, 2025
d8cf8a9
fix: added state to the required variable to correctly reflect update…
Sahil2004 Jul 31, 2025
77ef0c5
fix: merge conflict.
Sahil2004 Jul 31, 2025
1b131ba
fix: formatting.
Sahil2004 Jul 31, 2025
21fc810
chore: formatting and added prettier in group-charter-manager.
Sahil2004 Jul 31, 2025
a15fc60
chore: formatting
Sahil2004 Jul 31, 2025
eafd5ad
fix: critical performance issue with missing dependency array.
Sahil2004 Jul 31, 2025
745ec1f
fix: paraglide errors due to dependency error in control panel.
Sahil2004 Jul 31, 2025
0041c95
fix: user profile types.
Sahil2004 Jul 31, 2025
318ae1f
chore: checks fixed in pictique.
Sahil2004 Jul 31, 2025
f2f646e
fix: controlpanel deps issue.
Sahil2004 Jul 31, 2025
04cb3be
chore: renamed to a consistent namimg convention of handle instead of…
Sahil2004 Jul 31, 2025
87a6bd0
chore: formatting.
Sahil2004 Jul 31, 2025
438594d
fix: pglide
sosweetham Jul 31, 2025
a678245
fix: remove ignore for check
sosweetham Jul 31, 2025
9194c4e
fix: normalize check script
sosweetham Jul 31, 2025
efc030d
merge: main
sosweetham Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ yarn-error.log*
# Misc
.DS_Store
*.pem

/db/data
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
}
}
},
"editor.formatOnSave": true
}
12 changes: 12 additions & 0 deletions db.compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
db:
image: postgres:16
container_name: dev-metastate-db
environment:
POSTGRES_USER: metastate
POSTGRES_PASSWORD: metastate
POSTGRES_DB: metastate
volumes:
- ./db/data:/var/lib/postgresql/data
ports:
- "5432:5432"
Empty file added db/.gitinclude
Empty file.
29 changes: 29 additions & 0 deletions infrastructure/control-panel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# Paraglide
src/lib/paraglide

*storybook.log
storybook-static
1 change: 1 addition & 0 deletions infrastructure/control-panel/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
9 changes: 9 additions & 0 deletions infrastructure/control-panel/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb

# Miscellaneous
/static/
15 changes: 15 additions & 0 deletions infrastructure/control-panel/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
20 changes: 20 additions & 0 deletions infrastructure/control-panel/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [getAbsolutePath('@storybook/addon-svelte-csf')],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions infrastructure/control-panel/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/sveltekit';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions infrastructure/control-panel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## 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
npx sv create

# create a new project in my-app
npx sv create 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://svelte.dev/docs/kit/adapters) for your target environment.
44 changes: 44 additions & 0 deletions infrastructure/control-panel/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from 'eslint-plugin-storybook';

import prettier from 'eslint-config-prettier';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser, ...globals.node }
},
rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off'
}
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
},
storybook.configs['flat/recommended']
);
4 changes: 4 additions & 0 deletions infrastructure/control-panel/messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions infrastructure/control-panel/messages/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
47 changes: 47 additions & 0 deletions infrastructure/control-panel/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "control-panel",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@storybook/addon-svelte-csf": "^5.0.7",
"@storybook/sveltekit": "^9.0.17",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.22.0",
"@sveltejs/vite-plugin-svelte": "^6.0.0",
"@tailwindcss/vite": "^4.0.0",
"@types/node": "^22",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-storybook": "^9.0.17",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^9.0.17",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^7.0.4"
},
"dependencies": {
"@inlang/paraglide-js": "^2.0.0"
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions infrastructure/control-panel/project.inlang/project_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5BFJFCnZ9odC1qA9BH
12 changes: 12 additions & 0 deletions infrastructure/control-panel/project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
35 changes: 35 additions & 0 deletions infrastructure/control-panel/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@import 'tailwindcss';

@theme {
/* Custom theme */
--color-primary: #8e52ff;
--color-primary-100: #e8dcff;
--color-primary-200: #d2baff;
--color-primary-300: #bb97ff;
--color-primary-400: #a575ff;
--color-primary-500: #8e52ff;

--color-secondary: #73efd5;
--color-secondary-100: #e3fcf7;
--color-secondary-200: #c7f9ee;
--color-secondary-300: #abf6e6;
--color-secondary-400: #8ff2dd;
--color-secondary-500: #73efd5;

--color-white: #ffffff;
--color-gray: #f5f5f5;

--color-black: #1f1f1f;
--color-black-100: #d2d2d2;
--color-black-300: #a5a5a5;
--color-black-500: #797979;
--color-black-700: #4c4c4c;
--color-black-900: #1f1f1f;

--color-danger: #ff5255;
--color-danger-100: #ffdcdd;
--color-danger-200: #ffb1a7;
--color-danger-300: #ff968e;
--color-danger-400: #ff7b77;
--color-danger-500: #ff5255;
}
13 changes: 13 additions & 0 deletions infrastructure/control-panel/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export {};
12 changes: 12 additions & 0 deletions infrastructure/control-panel/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="%paraglide.lang%">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
13 changes: 13 additions & 0 deletions infrastructure/control-panel/src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Handle } from '@sveltejs/kit';
import { paraglideMiddleware } from '$lib/paraglide/server';

const handleParaglide: Handle = ({ event, resolve }) =>
paraglideMiddleware(event.request, ({ request, locale }) => {
event.request = request;

return resolve(event, {
transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale)
});
});

export const handle: Handle = handleParaglide;
3 changes: 3 additions & 0 deletions infrastructure/control-panel/src/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { deLocalizeUrl } from '$lib/paraglide/runtime';

export const reroute = (request) => deLocalizeUrl(request.url).pathname;
1 change: 1 addition & 0 deletions infrastructure/control-panel/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
7 changes: 7 additions & 0 deletions infrastructure/control-panel/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script lang="ts">
import '../app.css';

let { children } = $props();
</script>

{@render children()}
2 changes: 2 additions & 0 deletions infrastructure/control-panel/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
1 change: 1 addition & 0 deletions infrastructure/control-panel/src/routes/demo/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="/demo/paraglide">paraglide</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script lang="ts">
import { setLocale } from '$lib/paraglide/runtime';
import { page } from '$app/state';
import { goto } from '$app/navigation';
import { m } from '$lib/paraglide/messages.js';
</script>

<h1>{m.hello_world({ name: 'SvelteKit User' })}</h1>
<div>
<button onclick={() => setLocale('en')}>en</button>
<button onclick={() => setLocale('es')}>es</button>
</div>
<p>
If you use VSCode, install the <a
href="https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension"
target="_blank">Sherlock i18n extension</a
> for a better i18n experience.
</p>
1 change: 1 addition & 0 deletions infrastructure/control-panel/static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading