Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from "typeorm";

@Entity()
export class Verification {
@PrimaryGeneratedColumn("uuid")
id!: string;

@Column({ nullable: true })
veriffId!: string;

@Column({ nullable: true })
approved!: boolean;

@Column({ type: "jsonb", nullable: true })
data!: Record<string, unknown>;

@Column({ nullable: true })
referenceId!: string;

@Column({ nullable: true })
documentId!: string;

Comment on lines +14 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix type safety inconsistency with nullable columns.

The columns are marked as nullable: true in the database but use non-null assertion (!) in TypeScript, which creates a type safety inconsistency. Nullable database columns should have optional TypeScript types to properly represent the possibility of null/undefined values.

-    @Column({ nullable: true })
-    veriffId!: string;
+    @Column({ nullable: true })
+    veriffId?: string;

-    @Column({ nullable: true })
-    approved!: boolean;
+    @Column({ nullable: true })
+    approved?: boolean;

-    @Column({ type: "jsonb", nullable: true })
-    data!: Record<string, unknown>;
+    @Column({ type: "jsonb", nullable: true })
+    data?: Record<string, unknown>;

-    @Column({ nullable: true })
-    referenceId!: string;
+    @Column({ nullable: true })
+    referenceId?: string;

-    @Column({ nullable: true })
-    documentId!: string;
+    @Column({ nullable: true })
+    documentId?: string;
🤖 Prompt for AI Agents
In infrastructure/evault-provisioner/src/entities/Verification 2.ts between
lines 14 and 28, the entity columns are marked as nullable in the database but
use non-null assertion (!) in TypeScript, causing type safety issues. Change the
property declarations to use optional types or union types with null/undefined
(e.g., string | null or boolean | null) instead of non-null assertions to
accurately reflect the nullable nature of these columns.

@Column({ default: false })
consumed!: boolean;

@CreateDateColumn()
createdAt!: Date;

@UpdateDateColumn()
updatedAt!: Date;
}
Comment on lines +1 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Address filename and add validation for verification entity.

Similar to the database config file, this filename "Verification 2.ts" suggests a temporary or duplicate file. Additionally, for a verification entity handling sensitive identity data, consider adding validation constraints and ensuring this entity is properly registered in the database configuration.

Please verify:

  1. Should this filename be normalized to remove the space and "2"?
  2. Should validation constraints be added for critical fields?
  3. Is this entity intended to be used with the DataSource in the other file?

🏁 Script executed:

#!/bin/bash
# Search for other Verification entity files
fd -t f "Verification.*\.ts$" --exclude node_modules

# Check if this entity is used anywhere in the codebase
rg -A 3 -B 3 "Verification" --type ts --exclude-dir node_modules

Length of output: 809


Here’s another check to confirm how your entities are registered:


🏁 Script executed:

#!/bin/bash
# Find where a TypeORM DataSource is initialized
rg -A 3 -B 3 "new DataSource" --type ts

# Look for the `entities` option in your DataSource config
rg -A 3 -B 3 "entities" --type ts

Length of output: 19912


Consolidate duplicate entity & enforce validation

It looks like infrastructure/evault-provisioner/src/entities/Verification 2.ts is a stray copy of your real entity (Verification.ts) and isn’t wired into your DataSource. Let’s clean this up and add some safeguards:

• Delete the unused file
– infrastructure/evault-provisioner/src/entities/Verification 2.ts
• Merge any new fields/updates into
infrastructure/evault-provisioner/src/entities/Verification.ts
and remove spaces/“2” from the filename
• Harden your model with tighter column and/or class-validator rules, for example:
@column({ nullable: false, default: false }) approved
– @IsUUID() and @IsOptional() on veriffId, referenceId, documentId
@isboolean(), @IsOptional() on consumed
– (Install and import decorators from class-validator)
• Confirm your entity is registered in
infrastructure/evault-provisioner/src/config/database.ts
under entities: [Verification] so migrations and repositories load correctly

🤖 Prompt for AI Agents
In infrastructure/evault-provisioner/src/entities/Verification 2.ts lines 1 to
37, the file appears to be a duplicate with an inconsistent name and lacks
validation on critical fields. Delete this duplicate file, merge any updates
into the main Verification entity file named without spaces or "2", add
validation decorators from class-validator such as @IsUUID and @IsOptional on ID
fields, @IsBoolean and @IsOptional on boolean fields, and tighten column options
like setting approved to nullable: false with a default. Finally, ensure the
cleaned Verification entity is properly registered in the DataSource
configuration in infrastructure/evault-provisioner/src/config/database.ts under
the entities array.

21 changes: 9 additions & 12 deletions platforms/blabsy/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body {
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
background-color: white;
background-color: #161317;
}

@layer base {
Expand Down Expand Up @@ -62,21 +62,18 @@ body {

--color-gray-200: #eaecf0;

--color-brand-burnt-orange: #da4a11;
--color-brand-burnt-orange-100: #f8dbcf;
--color-brand-burnt-orange-200: #f3c3b0;
--color-brand-burnt-orange-300: #eca488;
--color-brand-burnt-orange-400: #e68660;
--color-brand-burnt-orange-500: #e06839;
--color-brand-burnt-orange-600: #91310b;
--color-brand-burnt-orange-700: #6d2509;
--color-brand-burnt-orange-800: #491906;
--color-brand-burnt-orange-900: #2c0f03;
--color-brand-burnt-orange: #8e52ff;
--color-brand-burnt-orange-100: #e8dcff;
--color-brand-burnt-orange-200: #d2baff;
--color-brand-burnt-orange-400: #bb97ff;
--color-brand-burnt-orange-600: #a575ff;
--color-brand-burnt-orange-800: #262230;
/* --color-brand-burnt-orange-900: #2c0f03; */

--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#eb5bf3 57.95%,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent gradient end color
The gradient still uses #f7a428, which belongs to the old orange palette. Update this stop to a purple shade to match the rest of the theme.

🤖 Prompt for AI Agents
In platforms/blabsy/src/app.css at line 76, the gradient end color is still set
to the old orange palette color #f7a428. Replace this color stop with a purple
shade that matches the rest of the theme to ensure color consistency in the
gradient.

#f7a428 152.07%
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class={cn(`max-w-[50%] ${isHeadNeeded ? 'mt-4' : 'mt-0'}`)}>
<div
class={cn(
`relative rounded-3xl px-4 py-2 ${isOwn ? 'bg-grey' : 'bg-brand-burnt-orange'}`
`relative rounded-3xl px-4 py-2 ${isOwn ? 'bg-black' : 'bg-brand-burnt-orange'}`
)}
>
{#if isHeadNeeded}
Expand All @@ -50,20 +50,20 @@
>
<path
d="M0 0C5.79116 4.95613 8.40437 9.60298 10 17L22 2C11 2.5 7.53377 0.634763 0 0Z"
fill={isOwn ? '#F5F5F5' : 'var(--color-brand-burnt-orange)'}
fill={isOwn ? '#1f1f1f' : 'var(--color-brand-burnt-orange)'}
/>
</svg>
{/if}

<p class={cn(`${!isOwn ? 'text-white' : 'text-black-600'}`)}>
<p class={cn(`${!isOwn ? 'text-white' : 'text-black-200'}`)}>
{message}
</p>
</div>

<p
class={cn(
`subtext text-black-400 mt-0.5 flex text-xs text-nowrap ${
isOwn ? 'justify-end' : 'justify-start'
isOwn ? 'justify-start' : 'justify-end'
}`
)}
>
Expand Down
12 changes: 6 additions & 6 deletions platforms/blabsy/src/lib/fragments/Header/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
background: ''
},
secondary: {
text: '',
text: 'text-black-200',
background: ''
},
tertiary: {
text: '',
background: 'bg-white/60'
background: ''
}
};

Expand Down Expand Up @@ -65,15 +65,15 @@
{#if variant !== 'primary'}
<button
class={cn([
'cursor-pointer rounded-full p-2 hover:bg-gray-100',
'hover:bg-brand-burnt-orange cursor-pointer rounded-full p-2',
classes.background
])}
onclick={backButtonCallback}
>
<HugeiconsIcon
icon={backButton[variant]}
size={24}
color="var(--color-black-500)"
color="var(--color-black-200)"
/>
</button>
{/if}
Expand All @@ -88,10 +88,10 @@
class={cn(['cursor-pointer rounded-full p-2 hover:bg-gray-100', classes.background])}
onclick={callback}
>
<HugeiconsIcon icon={menuButton[variant]} size={24} color="var(--color-black-500)" />
<HugeiconsIcon icon={menuButton[variant]} size={24} color="white" />
</button>
{:else if variant === 'secondary' && options}
<ActionMenu {options} />
<!-- <ActionMenu {options} /> -->
{/if}
</header>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<label
for={uniqueId}
class="bg-grey text-black-400 font-geist rounded-4xl flex h-[158px] w-full items-center justify-center text-base font-normal"
class="text-black-400 font-geist flex h-[158px] w-full items-center justify-center rounded-4xl bg-black text-base font-normal"
>
{#if files}
<div class="flex flex-col items-center gap-2">
Expand Down
6 changes: 3 additions & 3 deletions platforms/blabsy/src/lib/fragments/Message/Message.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
onclick={callback}
>
<Avatar src={avatar} alt="User Avatar" size="md" />
<span class="flex w-full flex-col items-start justify-end gap-1">
<span class="flex w-full flex-col items-start justify-end gap-2">
<span class="flex w-full items-center justify-between">
<h2>{username}</h2>
<h2 class="text-white">{username}</h2>
{#if unread}
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
{/if}
</span>
<p class="text-start text-black/60">{messageText}</p>
<p class="text-black-200 text-start">{messageText}</p>
</span>
</button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="bg-grey h-13 w-13 flex aspect-square items-center justify-center rounded-full"
class="bg-brand-burnt-orange flex aspect-square h-13 w-13 items-center justify-center rounded-full"
onclick={handleSend}
>
<HugeiconsIcon size="24px" icon={SentIcon} color="var(--color-black-400)" />
<HugeiconsIcon size="24px" icon={SentIcon} color="var(--color-black-200)" />
</div>
</div>
61 changes: 22 additions & 39 deletions platforms/blabsy/src/lib/fragments/Post/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
avatar,
username,
imgUris: uris,
text,
caption,
count,
callback,
time,
Expand Down Expand Up @@ -99,24 +99,24 @@
>
<Avatar src={avatar ?? 'https://picsum.photos/200/200'} alt={username} size="sm"
></Avatar>
<h2>{username}</h2>
<h4 class="text-black-200 font-semibold">{username}</h4>
</div>
<button
onclick={callback.menu}
class="cursor-pointer rounded-full p-2 hover:bg-gray-100"
>
<HugeiconsIcon icon={MoreVerticalIcon} size={24} color="var(--color-black-500)" />
</button>
<!-- <button onclick={callback.menu} class="cursor-pointer rounded-full p-2">
<HugeiconsIcon icon={MoreVerticalIcon} size={24} color="var(--color-black-200)" />
</button> -->
</div>
{/if}
{#if count}
<p class="text-black-200 text-lg">{caption}</p>
{/if}
{#if imgUris.length > 0}
<div class="relative">
{#if imgUris.length > 1}
<button
onclick={scrollLeft}
class="absolute start-2 top-1/2 z-10 hidden -translate-y-1/2 rounded-full bg-white p-2 shadow hover:bg-gray-200 md:inline-block"
class="bg-black-400 absolute start-2 top-1/2 z-10 hidden -translate-y-1/2 rounded-full p-2 shadow hover:bg-gray-200 md:inline-block"
>
<HugeiconsIcon icon={ArrowLeftIcon} size={20} color="black" />
<HugeiconsIcon icon={ArrowLeftIcon} size={20} color="var(--color-black-500)" />
</button>
{/if}
<div
Expand All @@ -128,7 +128,7 @@
<div class="aspect-[4/5] h-full w-full snap-center md:aspect-[16/9]">
<img
src={img}
alt={text}
alt={'post by' + username}
class="h-full w-full rounded-4xl object-cover"
onerror={handleImageError}
/>
Expand All @@ -153,51 +153,34 @@
{#if imgUris.length > 1}
<button
onclick={scrollRight}
class="absolute end-2 top-1/2 z-10 hidden -translate-y-1/2 rounded-full bg-white p-2 shadow hover:bg-gray-200 md:inline-block"
class="bg-black-400 absolute end-2 top-1/2 z-10 hidden -translate-y-1/2 rounded-full p-2 shadow hover:bg-gray-200 md:inline-block"
>
<HugeiconsIcon icon={ArrowRightIcon} size={20} color="black" />
<HugeiconsIcon icon={ArrowRightIcon} size={20} color="var(--color-black-500)" />
</button>
{/if}
</div>
{/if}
{#if count}
<p class="text-black/80">{text}</p>
<p class="text-black/60">{time}</p>
{/if}

<div class="flex w-full items-center justify-between">
{#if count}
<div class="flex gap-4">
<button
class="cursor-pointer rounded-2xl bg-gray-100 px-4 py-3 hover:bg-gray-200"
class="hover:bg-black-800 flex cursor-pointer items-center gap-2 rounded-2xl bg-black px-4 py-3"
onclick={callback.like}
>
<HugeiconsIcon
icon={ThumbsUpIcon}
size={24}
color="var(--color-red-500)"
strokeWidth={3}
/>
<HugeiconsIcon icon={ThumbsUpIcon} size={24} color="var(--color-black-400)" />
<p class="subtext text-black-400">{count?.likes}</p>
</button>
<button
class="cursor-pointer rounded-2xl bg-gray-100 px-4 py-3 hover:bg-gray-200"
class="hover:bg-black-800 flex cursor-pointer items-center gap-2 rounded-2xl bg-black px-4 py-3"
onclick={callback.comment}
>
<HugeiconsIcon icon={Message02Icon} size={24} color="var(--color-black-500)" />
<HugeiconsIcon icon={Message02Icon} size={24} color="var(--color-black-400)" />
<p class="subtext text-black-400">{count?.comments}</p>
</button>
</div>
{/if}
{#if count}
<div class="flex items-center justify-between gap-3 text-lg text-black/40">
<p class="subtext text-black-400">{count?.likes} likes</p>
<HugeiconsIcon
icon={RecordIcon}
size={5}
strokeWidth={30}
color="var(--color-black-400)"
className="rounded-full"
/>
<p class="subtext text-black-400">{count?.comments} comments</p>
</div>
<p class="text-black-400">{time}</p>
{/if}
</div>
<hr class="text-black" />
</article>
10 changes: 5 additions & 5 deletions platforms/blabsy/src/lib/fragments/Profile/Profile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
class="h-20 w-20 rounded-full object-cover"
/>
<div class="flex-1">
<h2 class="text-xl font-semibold">{profileData.username}</h2>
<h2 class="text-black-200 text-xl font-semibold">{profileData.username}</h2>
<p class="text-gray-600">{profileData.userBio}</p>
</div>
{#if variant === 'other'}
<div class="flex gap-2">
<Button variant="primary" callback={handleFollow}>Follow</Button>
<Button variant="primary" callback={handleMessage}>Message</Button>
<Button variant="primary" size="sm" callback={handleFollow}>Follow</Button>
<Button variant="primary" size="sm" callback={handleMessage}>Message</Button>
</div>
{/if}
</div>

<div class="flex gap-8 text-center">
<div class="flex gap-8 text-center text-white">
<div>
<p class="font-semibold">{profileData.totalPosts}</p>
<p class="font-semibold">{profileData.totalPosts ?? 0}</p>
<p class="text-gray-600">Posts</p>
</div>
<div>
Expand Down
Loading
Loading