-
Notifications
You must be signed in to change notification settings - Fork 7
Migrates submission service, is running #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update refactors moderation and submission management by introducing a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SubmissionService
participant ModerationService
participant FeedService
participant ProcessorService
participant DB
User->>SubmissionService: handleSubmission(tweet)
SubmissionService->>FeedService: getFeedById(feedId)
SubmissionService->>DB: create submission & feed entry (transaction)
SubmissionService->>ModerationService: processApprovalDecision(...) (if curator is moderator)
ModerationService->>DB: save moderation action & update status (transaction)
ModerationService->>ProcessorService: process approved submission (if stream output enabled)
SubmissionService->>User: (acknowledge submission)
User->>SubmissionService: handleModeration(tweet)
SubmissionService->>DB: fetch submission by curatorTweetId
SubmissionService->>FeedService: getFeedById(feedId)
SubmissionService->>ModerationService: processApprovalDecision/processRejectionDecision
ModerationService->>DB: save moderation action & update status (transaction)
ModerationService->>ProcessorService: process approved submission (if applicable)
SubmissionService->>User: (acknowledge moderation)
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🧹 Nitpick comments (8)
apps/app/src/lib/config.ts (1)
1-3: Consider future flexibility of hardcoded bot ID.The simplification looks good and aligns with the architectural refactoring. However, consider whether hardcoding the bot ID might reduce flexibility if it needs to change in different environments or configurations in the future.
If environment-specific bot IDs might be needed later, consider using environment variables:
export function useBotId() { - return "curatedotfun"; + return process.env.VITE_BOT_ID || "curatedotfun"; }packages/shared-db/src/repositories/feed.repository.ts (1)
405-408: Consider explicit timestamp handling for consistency.The comment suggests relying on database defaults for timestamps, but for consistency with other methods in this class (e.g.,
upsertRecapStateat lines 249, 272-273), consider explicitly settingcreatedAtandupdatedAt..values({ submissionId: data.submissionId, feedId: data.feedId, status: data.status ?? submissionStatusZodEnum.Enum.pending, - // moderationResponseTweetId is not part of InsertSubmissionFeed for new entries, - // so it will default to null in the DB if the column is nullable. - // Timestamps (createdAt, updatedAt) should be handled by Drizzle/DB defaults if configured in schema. + createdAt: new Date(), + updatedAt: new Date(), })packages/shared-db/src/repositories/submission.repository.ts (1)
144-168: Consider the performance implications of multiple queriesThe refactored approach makes 3 separate database queries (base submission, feeds, moderation history) instead of potentially using a single joined query. While this improves code maintainability and allows for granular retry logic, it may impact performance under high load.
Consider monitoring the performance impact and potentially implementing caching if this becomes a bottleneck.
packages/types/src/domain/submission.ts (1)
19-27: Consider using an enum for moderation actionsFor consistency with
SubmissionStatusEnum, consider defining aModerationActionEnuminstead of using literal types for theactionfield.+export const ModerationActionEnum = { + APPROVE: "approve", + REJECT: "reject", +} as const; + +export type ModerationAction = + (typeof ModerationActionEnum)[keyof typeof ModerationActionEnum]; + export interface Moderation { adminId: string; - action: "approve" | "reject"; + action: ModerationAction; timestamp: Date; tweetId: string; feedId: string; note: string | null; moderationResponseTweetId?: string | null; }apps/api/src/services/moderation.service.ts (1)
44-46: Consider storing the moderation trigger tweet IDThe comment indicates that
moderationTriggerTweetIdis not stored in the moderation history. For better audit trails and traceability, consider adding this field to the schema to track which tweet triggered the moderation action.apps/api/src/services/submission.service.ts (3)
26-38: Consider reducing constructor dependencies to improve maintainability.The constructor accepts 8 dependencies, which suggests this class might be handling too many responsibilities. Consider extracting some functionality into separate services or using a dependency injection container pattern to manage these dependencies more cleanly.
265-275: Optimize submission retrieval after creation.Instead of re-fetching the submission after creation, consider modifying the
saveSubmissionmethod to return the created entity with generated IDs. This would eliminate an extra database query.- await this.db.transaction(async (tx) => { - await this.submissionRepository.saveSubmission( - newSubmissionData, - tx, - ); - await this.submissionRepository.incrementDailySubmissionCount( - curatorUserId, - tx, - ); - }); - // Re-fetch the submission to get the full RichSubmission object with IDs and empty relations - activeSubmission = await this.submissionRepository.getSubmission( - originalTweet.id, - ); + activeSubmission = await this.db.transaction(async (tx) => { + const submission = await this.submissionRepository.saveSubmission( + newSubmissionData, + tx, + ); + await this.submissionRepository.incrementDailySubmissionCount( + curatorUserId, + tx, + ); + return submission; + });
337-350: Consider optimizing the re-fetch pattern for activeSubmission.Similar to the earlier re-fetch issue, consider having
saveSubmissionToFeedreturn the updated submission state to avoid the extra database query. The current approach with error handling for failed re-fetch is defensive but adds complexity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (24)
apps/api/package.json(1 hunks)apps/api/src/routes/api/submission.ts(2 hunks)apps/api/src/services/config.service.ts(1 hunks)apps/api/src/services/moderation.service.ts(1 hunks)apps/api/src/services/processor.service.ts(5 hunks)apps/api/src/services/submission.service.ts(5 hunks)apps/api/src/types/twitter.ts(0 hunks)apps/api/src/utils/service-provider.ts(5 hunks)apps/api/test/unit/repositories/feed.repository.test.ts(0 hunks)apps/api/test/unit/repositories/leaderboard.repository.test.ts(0 hunks)apps/api/test/unit/repositories/submission.repository.test.ts(0 hunks)apps/api/test/unit/repositories/twitter.repository.test.ts(0 hunks)apps/app/src/components/FeedList.tsx(1 hunks)apps/app/src/components/Leaderboard.tsx(3 hunks)apps/app/src/lib/api.ts(4 hunks)apps/app/src/lib/config.ts(1 hunks)apps/app/vercel.json(1 hunks)packages/shared-db/src/queries.ts(1 hunks)packages/shared-db/src/repositories/feed.repository.ts(1 hunks)packages/shared-db/src/repositories/submission.repository.ts(3 hunks)packages/shared-db/src/validators.ts(1 hunks)packages/types/src/api.ts(0 hunks)packages/types/src/domain/submission.ts(1 hunks)packages/types/src/index.ts(1 hunks)
💤 Files with no reviewable changes (6)
- packages/types/src/api.ts
- apps/api/src/types/twitter.ts
- apps/api/test/unit/repositories/leaderboard.repository.test.ts
- apps/api/test/unit/repositories/twitter.repository.test.ts
- apps/api/test/unit/repositories/feed.repository.test.ts
- apps/api/test/unit/repositories/submission.repository.test.ts
🧰 Additional context used
🧬 Code Graph Analysis (6)
apps/app/src/components/Leaderboard.tsx (1)
apps/app/src/lib/api.ts (1)
useAllFeeds(37-48)
apps/api/src/services/processor.service.ts (2)
packages/shared-db/src/validators.ts (1)
RichSubmission(97-100)packages/utils/src/errors.ts (1)
ProcessorError(313-326)
packages/shared-db/src/queries.ts (3)
packages/shared-db/src/schema/submissions.ts (1)
submissions(29-47)packages/shared-db/src/validators.ts (1)
SelectSubmission(95-95)packages/shared-db/src/repositories/submission.repository.ts (1)
getSubmission(141-176)
packages/shared-db/src/repositories/submission.repository.ts (3)
packages/shared-db/src/validators.ts (3)
RichSubmission(97-100)SelectSubmissionFeed(108-108)SelectModerationHistory(128-130)packages/shared-db/src/utils.ts (2)
withErrorHandling(97-126)executeWithRetry(71-87)packages/shared-db/src/schema/submissions.ts (1)
moderationHistory(68-88)
packages/shared-db/src/repositories/feed.repository.ts (3)
packages/shared-db/src/validators.ts (1)
SelectSubmissionFeed(108-108)packages/shared-db/src/utils.ts (1)
withErrorHandling(97-126)packages/shared-db/src/schema/submissions.ts (1)
submissionFeeds(49-66)
apps/app/src/lib/api.ts (1)
packages/types/src/domain/submission.ts (1)
Submission(29-43)
🔇 Additional comments (15)
apps/app/vercel.json (1)
13-13: LGTM: Proper file formatting.Adding a trailing newline follows standard file formatting practices and improves consistency.
apps/api/package.json (1)
39-39: LGTM: Correct dependency categorization.Moving
@curatedotfun/typesto dependencies is appropriate since it's now used in runtime service logic rather than just development/type-checking.apps/api/src/services/config.service.ts (1)
1-1: LGTM: Clean import consolidation.Consolidating the import statement improves code readability without affecting functionality.
packages/types/src/index.ts (1)
4-4:Details
✅ Verification successful
Verify the new domain submission module exists.
The export change looks good and aligns with the architectural refactoring. Please ensure that
./domain/submissionmodule exists and properly exports the expected types.
🏁 Script executed:
#!/bin/bash # Description: Verify the domain submission module exists and has proper exports # Expected: File should exist and contain submission-related type exports # Check if the file exists fd "submission.ts" packages/types/src/domain/ # Check the exports in the submission module cat packages/types/src/domain/submission.tsLength of output: 1108
Domain submission module verified and approved
I confirmed that
packages/types/src/domain/submission.tsexists and exports the following as expected:
SubmissionStatusEnumSubmissionStatusSubmissionFeedModerationSubmissionNo further changes are needed here.
apps/app/src/components/FeedList.tsx (1)
2-5: Clean migration to the new data fetching pattern.The switch from the previous data fetching approach to
useAllFeedsis well-implemented. The hook usage follows React Query patterns correctly, and the component maintains the same functionality.packages/shared-db/src/validators.ts (1)
97-100:Details
✅ Verification successful
Well-designed type extension for richer submission data.
The
RichSubmissiontype provides a clean way to include related submission data (feeds and moderation history) alongside the base submission. The naming and structure are consistent with the existing patterns.Verify that the referenced types are properly defined and exported:
🏁 Script executed:
#!/bin/bash # Verify that SelectSubmissionFeed and SelectModerationHistory types are defined ast-grep --pattern 'export type SelectSubmissionFeed' ast-grep --pattern 'export type SelectModerationHistory'Length of output: 114
Let's search the entire codebase for these types to confirm their definitions and exports:
🏁 Script executed:
#!/bin/bash # Find all occurrences of the referenced types rg "SelectSubmissionFeed" -n rg "SelectModerationHistory" -nLength of output: 3133
RichSubmission type extension approved
Confirmed that both referenced types are properly defined and exported in
packages/shared-db/src/validators.ts:
- Line 108:
export type SelectSubmissionFeed = z.infer<typeof selectSubmissionFeedSchema>;- Line 128:
export type SelectModerationHistory = z.infer<typeof selectModerationHistorySchema>;No further action required.
apps/app/src/components/Leaderboard.tsx (1)
4-4: Successful migration to the new data fetching pattern.The migration from the previous data fetching approach to
useAllFeedsis well-executed:
- Hook usage follows proper React patterns
- Data mapping is correctly updated to work with the new structure
- Dependency array is properly maintained for the memoized feeds
- Component functionality remains intact
Also applies to: 29-29, 47-53
apps/api/src/utils/service-provider.ts (1)
110-119: LGTM! Enhanced SubmissionService with moderation capabilities.The SubmissionService constructor has been properly updated to include the new
moderationServiceandfeedServicedependencies, enabling enhanced moderation workflows.packages/shared-db/src/queries.ts (2)
144-158: Approve the query simplification with improved type safety.The simplified query logic with direct type casting is cleaner and leverages Drizzle's native date handling. The comment clarifies the behavior change regarding date objects.
133-142:Details
✅ Verification successful
Verify that simplified query returns all required data.
The query simplification removes explicit column selection and joins. While this makes the code cleaner, ensure that the
SelectSubmissiontype casting doesn't mask any missing data that was previously included via joins.
🏁 Script executed:
#!/bin/bash # Description: Compare the SelectSubmission type definition with the submissions table schema # Expected: All fields should be properly mapped # Check the SelectSubmission type definition ast-grep --pattern $'export type SelectSubmission = $_' # Check the submissions table schema ast-grep --pattern $'export const submissions = table($_)'Length of output: 227
🏁 Script executed:
#!/bin/bash # List all table definitions to locate the submissions table rg "export const .*Table" -n packages/shared-db/src # Find the submissions table definition specifically rg "export const submissions" -n -C5 packages/shared-db/src # Inspect the selectSubmissionSchema to compare its fields against the table rg "export const selectSubmissionSchema" -n -C10 packages/shared-db/src/validators.tsLength of output: 2572
Query returns full submission columns as defined by the schema
The
createSelectSchema(submissions, { createdAt: z.date(), updatedAt: z.date().nullable() })call builds a Zod schema over all columns in thesubmissionstable (includingcuratorTweetId, status fields, timestamps, etc.), so using.select().from(submissions)returns the same set of fields you’d get via explicit column listing.No joins remain to be applied for this query—its return type is correctly scoped to a single submission record—and casting to
SelectSubmissionis safe.apps/api/src/services/processor.service.ts (2)
1-5: Excellent type safety improvement.Adding the
RichSubmissionimport enhances type safety throughout the processing pipeline.
35-35: LGTM! Enhanced type safety with RichSubmission.Changing the parameter type from
anytoRichSubmissionprovides better type safety and clearer documentation of expected data structure. This aligns with the broader refactoring to use richer submission types.packages/shared-db/src/repositories/feed.repository.ts (1)
392-423: Improved method design with better return value and direct database operation.The changes enhance the
saveSubmissionToFeedmethod by:
- Returning the created
SelectSubmissionFeedrecord instead of void- Using direct database insertion for better control
- Proper error handling for insertion failures
The implementation correctly handles the insertion and validates that a record was returned.
apps/app/src/lib/api.ts (1)
37-48: LGTM! Well-implemented hookThe
useAllFeedshook follows the established patterns in the codebase with proper error handling and React Query usage.apps/api/src/services/moderation.service.ts (1)
110-145: Well-implemented error handling and transaction rollbackThe error handling in this method is excellent - logging errors with context and re-throwing to ensure transaction rollback. The check for feed configuration is also appropriate.
| // TODO reference enum schema | ||
| "pending", | ||
| "approved", | ||
| "rejected", | ||
| ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Address the TODO and eliminate status value duplication.
The TODO comment indicates plans to reference an enum schema, but the current implementation duplicates status values. This creates maintenance overhead and potential inconsistencies.
Apply the same centralized constant approach here:
- status: z
- .enum([
- // TODO reference enum schema
- "pending",
- "approved",
- "rejected",
- ])
- .optional(),
+ status: z.enum(SUBMISSION_STATUSES).optional(),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // TODO reference enum schema | |
| "pending", | |
| "approved", | |
| "rejected", | |
| ]) | |
| status: z.enum(SUBMISSION_STATUSES).optional(), |
🤖 Prompt for AI Agents
In apps/api/src/routes/api/submission.ts around lines 69 to 73, the status
values "pending", "approved", and "rejected" are hardcoded and duplicated, which
can lead to maintenance issues. Replace these hardcoded strings by referencing a
centralized enum or constant that defines these status values. Import the enum
or constant from its module and use it here to ensure consistency and reduce
duplication.
| SubmissionStatus.REJECTED, | ||
| ]) | ||
| .optional(), | ||
| status: z.enum(["pending", "approved", "rejected"]).optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using a centralized enum or constant for status validation.
Using string literals instead of an enum reduces type safety and increases the risk of typos. This approach duplicates the status values in multiple locations.
Consider creating a centralized status constant:
+const SUBMISSION_STATUSES = ["pending", "approved", "rejected"] as const;
+
- status: z.enum(["pending", "approved", "rejected"]).optional(),
+ status: z.enum(SUBMISSION_STATUSES).optional(),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| status: z.enum(["pending", "approved", "rejected"]).optional(), | |
| // Add at the top of the file (or above your schema definition) | |
| const SUBMISSION_STATUSES = ["pending", "approved", "rejected"] as const; | |
| // …later in your schema… | |
| status: z.enum(SUBMISSION_STATUSES).optional(), |
🤖 Prompt for AI Agents
In apps/api/src/routes/api/submission.ts at line 19, replace the inline string
literals used in the z.enum for status validation with a centralized enum or
constant. Define a shared enum or constant object for the status values in a
common module and import it here. Then use this enum or constant in the z.enum
call to improve type safety and avoid duplication or typos.
| const moderationService = new ModerationService( | ||
| feedRepository, | ||
| submissionRepository, | ||
| processorService, | ||
| configService.getConfig(), | ||
| db, | ||
| logger, | ||
| ); | ||
| this.services.set("moderationService", moderationService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify ModerationService constructor parameters match the service definition.
The ModerationService is instantiated with 6 parameters: feedRepository, submissionRepository, processorService, configService.getConfig(), db, and logger. Ensure this matches the expected constructor signature in the ModerationService class.
🏁 Script executed:
#!/bin/bash
# Description: Verify ModerationService constructor signature matches the instantiation
# Expected: Constructor should accept the 6 parameters in the same order
ast-grep --pattern $'class ModerationService {
$$$
constructor($$$) {
$$$
}
$$$
}'Length of output: 95
I wasn’t able to locate the ModerationService constructor from the initial AST search. Let’s pinpoint the file and inspect its signature directly:
🏁 Script executed:
#!/bin/bash
# 1. Find the file defining ModerationService
file=$(rg --files-with-match "export class ModerationService" --glob "*.ts" -l)
echo "Found file: $file"
# 2. Show where the class and constructor are declared
rg -n "class ModerationService" "$file"
rg -n "constructor\s*\(" "$file"Length of output: 723
Let’s correct the rg flags and locate the actual file, then inspect its constructor signature:
🏁 Script executed:
#!/bin/bash
# 1. Find all TS files containing the ModerationService class
files=$(rg -l "class ModerationService" -g "*.ts")
echo "Found file(s):"
echo "$files"
# 2. For each file, show the class and constructor lines
for f in $files; do
echo "=== $f ==="
rg -n "class ModerationService" "$f"
rg -n "constructor" "$f"
doneLength of output: 581
Let’s pull the full constructor signature with a few lines of context:
🏁 Script executed:
#!/bin/bash
# Show constructor signature with surrounding lines for clarity
rg -n -C3 "constructor" apps/api/src/services/moderation.service.tsLength of output: 370
Let’s pull the full constructor signature to confirm all parameters and their order:
🏁 Script executed:
#!/bin/bash
# Display lines 15–35 to capture the entire constructor signature
sed -n '15,35p' apps/api/src/services/moderation.service.tsLength of output: 777
Fix ModerationService instantiation arguments
The ModerationService constructor (in
apps/api/src/services/moderation.service.ts) expects the following parameters in order:
feedRepositorysubmissionRepositoryprocessorServicefeedServicedblogger
However, the current instantiation in apps/api/src/utils/service-provider.ts (lines 98–106) passes configService.getConfig() as the fourth argument instead of feedService. Please update it to use the proper feedService instance.
• File: apps/api/src/utils/service-provider.ts (around lines 98–106)
• Ensure feedService is imported or retrieved before instantiation
Suggested diff:
- const moderationService = new ModerationService(
- feedRepository,
- submissionRepository,
- processorService,
- configService.getConfig(),
- db,
- logger,
- );
+ const moderationService = new ModerationService(
+ feedRepository,
+ submissionRepository,
+ processorService,
+ feedService,
+ db,
+ logger,
+ );📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const moderationService = new ModerationService( | |
| feedRepository, | |
| submissionRepository, | |
| processorService, | |
| configService.getConfig(), | |
| db, | |
| logger, | |
| ); | |
| this.services.set("moderationService", moderationService); | |
| const moderationService = new ModerationService( | |
| feedRepository, | |
| submissionRepository, | |
| processorService, | |
| feedService, | |
| db, | |
| logger, | |
| ); | |
| this.services.set("moderationService", moderationService); |
🤖 Prompt for AI Agents
In apps/api/src/utils/service-provider.ts around lines 98 to 106, the
ModerationService constructor is called with configService.getConfig() as the
fourth argument, but it expects feedService instead. Fix this by replacing
configService.getConfig() with the correct feedService instance, ensuring
feedService is properly imported or obtained before this instantiation.
| curatorId: string; | ||
| curatorUsername: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make curator fields nullable
Based on the repository code and database schema, submissions can exist without curators. These fields should be nullable to accurately represent the data model.
export interface Submission {
tweetId: string;
userId: string;
username: string;
- curatorId: string;
- curatorUsername: string;
+ curatorId: string | null;
+ curatorUsername: string | null;
content: string;
curatorNotes: string | null;
- curatorTweetId: string;
+ curatorTweetId: string | null;
createdAt: Date;
submittedAt: Date | null;
updatedAt?: Date | null;
moderationHistory: Moderation[];
feeds: SubmissionFeed[];
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| curatorId: string; | |
| curatorUsername: string; | |
| export interface Submission { | |
| tweetId: string; | |
| userId: string; | |
| username: string; | |
| curatorId: string | null; | |
| curatorUsername: string | null; | |
| content: string; | |
| curatorNotes: string | null; | |
| curatorTweetId: string | null; | |
| createdAt: Date; | |
| submittedAt: Date | null; | |
| updatedAt?: Date | null; | |
| moderationHistory: Moderation[]; | |
| feeds: SubmissionFeed[]; | |
| } |
🤖 Prompt for AI Agents
In packages/types/src/domain/submission.ts at lines 33 to 34, the curatorId and
curatorUsername fields are currently non-nullable strings, but submissions can
exist without curators. Update these fields to be nullable by allowing them to
be either a string or null to correctly reflect the data model and database
schema.
| async start(): Promise<void> { | ||
| // Do an immediate check | ||
| await this.checkMentions(); | ||
|
|
||
| // Then check mentions | ||
| this.checkInterval = setInterval(async () => { | ||
| await this.checkMentions(); | ||
| }, 60000); // every minute | ||
| }, 60000); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Make the polling interval configurable.
The interval is hardcoded to 60 seconds. Consider making this configurable through the AppConfig to allow different polling frequencies for different environments.
async start(): Promise<void> {
await this.checkMentions();
this.checkInterval = setInterval(async () => {
await this.checkMentions();
- }, 60000);
+ }, this.config.global.mentionCheckIntervalMs || 60000);
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| async start(): Promise<void> { | |
| // Do an immediate check | |
| await this.checkMentions(); | |
| // Then check mentions | |
| this.checkInterval = setInterval(async () => { | |
| await this.checkMentions(); | |
| }, 60000); // every minute | |
| }, 60000); | |
| } | |
| async start(): Promise<void> { | |
| await this.checkMentions(); | |
| this.checkInterval = setInterval(async () => { | |
| await this.checkMentions(); | |
| }, this.config.global.mentionCheckIntervalMs || 60000); | |
| } |
🤖 Prompt for AI Agents
In apps/api/src/services/submission.service.ts around lines 104 to 109, the
polling interval for checkMentions is hardcoded to 60000 milliseconds. Modify
the code to retrieve the interval value from AppConfig instead of using a fixed
value, allowing different environments to specify their own polling frequency.
Ensure the interval is read once during start and used in setInterval.
* Get basic working (#109) * Get basic working * adds rss feeds * added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed * fixes to config for grants, sui, and telegram channels (#102) * add query param for selective processing (#103) * adds query param to process * add query param for processing * simplify * add tags * Feat: implement frontend leaderboard (#93) * feat: implement frontend leaderboard * feat: implement a leaderboard in frontend * feat: implemented leaderboard * fix: rebuild implement leaderboard * fix: prettier * fix: prettier * fix: reimplement frontend leaderboard * fix: implement frontend leaderboard * approval rate * sets approval rate and hides curator --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * remove tailwind-scrollbar * added bob to desci feed * Get basic working * set .env.example * nitpicks --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@everything.dev> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> * fix polyfills * Explore Page (#108) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header + Explore Page Style (#113) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header Updates + Web3Auth getUserInfo + Explore Page changes * fmt * coderabbit comments resolved * Profile page (#120) * Update the FE to have the profile page (header and tabs init) * Move tabs to it's own component * Add stats and top badges to overview * Finish the overview tab * Update overview page and init content page * feat(profile-page): add Content and My Feed tags * feat(profile-page): finish profile page static UI * refactor: fmt * [FEATURE] Create Feed Page - DRAFT (#121) * Curate Engine Step 1 * content-progress-configuration step-1 * Curation Settings Part 2 and 3 * CodeRabbit Comments Resolved + Mobile Responsive * Responsiveness: empty State, JSON check --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * update to main * fmt * Feat/submissions page (#127) * Submissions Page + Feed Page + Mobile Responsiveness * fixes * craete-feed authenticated user condition * fmt * remove sqlite --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * Feed Page Tabs (#130) * set tanstack routes (#132) * [Task]: Add connect button to feed page (#131) * feat: Add connect button to feed page * fix: recommit * added back to stablecoins feed since stablewatch forked their own * fix packages, update pg, and ignore cloudflare sockets * fmt --------- Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * uses prod data * Update changes to latest staging * Revert "Update changes to latest staging" This reverts commit cd12908. * Fix Sort By Oldest (#136) * fix: Sort By Oldest * fix: Sort By Oldest * fix: Fix RecentSubmissions Sort Order Update * fix: All feed should be hidden, remove double title --------- Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com> * UI fixes (#138) * UI fixes * fmt --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * Fix: Leaderboard improvements (#140) * fix: Leaderboard improvements * fix: fmt * reorganize * remove unused * rename * clean up * fmt --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * clean up * wallet wip * todo * auth flow, wip * types clean up * fix types * login modal wip * modals * controller, service, successful create account * clean with data, metadata, and pattern, validation, and json schema * add migration doc * add activity and delete user * fix migration * add seed remote method * fix naming * fix script call * file extension * remove build schema * proper build time * fix Dockerfile * rsbuild * Standard Header Component + Responsivenss Fixes (#146) * Standard Header Component + Responsivenss Fixes * fmt * rename Hero --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * fix broken link * don't distribute on staging * fix path * env log * comment out * railway env * fix: Profile adjustments (#153) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * Login Modal Fixes (#154) * Login Modal Fixes * Resolve Comments * container * container fixes --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * organize * fmt * update feeds (#156) * Leaderboard width fixes * feat: save profile image to pinata (#158) * feat(fe): save profile image to pinata * fix: fix comment * Feat Integrate NEAR Solana, Ethereum wallet selection (#159) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * feat: Integrate NEAR wallet selection * fix: run fmt * fix: add function create accesstokenpayload use wallet selector near * fix: resolve conversation * Feed Submission + Feed Review Page (#160) * Feed Review Page and Feed Creation * fmt * coderabbit comments resolved * comments resolved * comments resolved * reset routeTree * minor fixes (#164) * minor fixes * fmt * remove node-compile-cache * reuse user menu * header clean up * remove how it works * clean up * set submissions at root route * fmt * clean * create is coming soon * clean up * user link * Adds caddyfile and frontend clean up (#165) * removes serve static from backend * fmt * fix build * adds caddyfile * clean up submission feed * pnpm lock * fix turbo * fix build * db migration * without time zone * cleans up submission list * Adds shared-db, types package, initial migration (#166) * init * upgrade tsconfigs * shared-db build * shared-db wip * transfer getAllSubmissions * hooked up * moves to shared-db * fmt * update dockerfile * monorepo * working build * migration service * turbo * install pnpm * temp proxy * no include request headers * clean up * proper path * renaming * fmt * update caddyfile * different strategy * use route * fix BACKEND to API * ignore temp * temp remove * back to orig * turn on auto https * disable * route block * clean up * configure host * favicon * add staging domain * http: * set domain adn host * correct bash * matching host * Adds edit feed and image upload (#168) * adds page * image upload and edit feed * update pnpm lock * CSR * vercel json * move * temp disable auth * set image * fix query * submisison service running * Migrates submission service, is running (#169) * init * wip * clean up * feed list clean up * break up functions * fix config path * adds plugins route and integrates with plugin service * remote curate.config.json * plugins table * adds plugin pages * set type * fix feed types * plguin errors * env injection * fix queries * fix migration * fix migration * fix migration * redo migration * decouples moderation * fix status * fix feeds * hide moderation actions --------- Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com> Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
* Get basic working (#109) * Get basic working * adds rss feeds * added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed * fixes to config for grants, sui, and telegram channels (#102) * add query param for selective processing (#103) * adds query param to process * add query param for processing * simplify * add tags * Feat: implement frontend leaderboard (#93) * feat: implement frontend leaderboard * feat: implement a leaderboard in frontend * feat: implemented leaderboard * fix: rebuild implement leaderboard * fix: prettier * fix: prettier * fix: reimplement frontend leaderboard * fix: implement frontend leaderboard * approval rate * sets approval rate and hides curator --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * remove tailwind-scrollbar * added bob to desci feed * Get basic working * set .env.example * nitpicks --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@everything.dev> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> * fix polyfills * Explore Page (#108) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header + Explore Page Style (#113) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header Updates + Web3Auth getUserInfo + Explore Page changes * fmt * coderabbit comments resolved * Profile page (#120) * Update the FE to have the profile page (header and tabs init) * Move tabs to it's own component * Add stats and top badges to overview * Finish the overview tab * Update overview page and init content page * feat(profile-page): add Content and My Feed tags * feat(profile-page): finish profile page static UI * refactor: fmt * [FEATURE] Create Feed Page - DRAFT (#121) * Curate Engine Step 1 * content-progress-configuration step-1 * Curation Settings Part 2 and 3 * CodeRabbit Comments Resolved + Mobile Responsive * Responsiveness: empty State, JSON check --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * update to main * fmt * Feat/submissions page (#127) * Submissions Page + Feed Page + Mobile Responsiveness * fixes * craete-feed authenticated user condition * fmt * remove sqlite --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * Feed Page Tabs (#130) * set tanstack routes (#132) * [Task]: Add connect button to feed page (#131) * feat: Add connect button to feed page * fix: recommit * added back to stablecoins feed since stablewatch forked their own * fix packages, update pg, and ignore cloudflare sockets * fmt --------- Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * uses prod data * Update changes to latest staging * Revert "Update changes to latest staging" This reverts commit cd12908. * Fix Sort By Oldest (#136) * fix: Sort By Oldest * fix: Sort By Oldest * fix: Fix RecentSubmissions Sort Order Update * fix: All feed should be hidden, remove double title --------- Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com> * UI fixes (#138) * UI fixes * fmt --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * Fix: Leaderboard improvements (#140) * fix: Leaderboard improvements * fix: fmt * reorganize * remove unused * rename * clean up * fmt --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * clean up * wallet wip * todo * auth flow, wip * types clean up * fix types * login modal wip * modals * controller, service, successful create account * clean with data, metadata, and pattern, validation, and json schema * add migration doc * add activity and delete user * fix migration * add seed remote method * fix naming * fix script call * file extension * remove build schema * proper build time * fix Dockerfile * rsbuild * Standard Header Component + Responsivenss Fixes (#146) * Standard Header Component + Responsivenss Fixes * fmt * rename Hero --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * fix broken link * don't distribute on staging * fix path * env log * comment out * railway env * fix: Profile adjustments (#153) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * Login Modal Fixes (#154) * Login Modal Fixes * Resolve Comments * container * container fixes --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * organize * fmt * update feeds (#156) * Leaderboard width fixes * feat: save profile image to pinata (#158) * feat(fe): save profile image to pinata * fix: fix comment * Feat Integrate NEAR Solana, Ethereum wallet selection (#159) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * feat: Integrate NEAR wallet selection * fix: run fmt * fix: add function create accesstokenpayload use wallet selector near * fix: resolve conversation * Feed Submission + Feed Review Page (#160) * Feed Review Page and Feed Creation * fmt * coderabbit comments resolved * comments resolved * comments resolved * reset routeTree * minor fixes (#164) * minor fixes * fmt * remove node-compile-cache * reuse user menu * header clean up * remove how it works * clean up * set submissions at root route * fmt * clean * create is coming soon * clean up * user link * Adds caddyfile and frontend clean up (#165) * removes serve static from backend * fmt * fix build * adds caddyfile * clean up submission feed * pnpm lock * fix turbo * fix build * db migration * without time zone * cleans up submission list * Adds shared-db, types package, initial migration (#166) * init * upgrade tsconfigs * shared-db build * shared-db wip * transfer getAllSubmissions * hooked up * moves to shared-db * fmt * update dockerfile * monorepo * working build * migration service * turbo * install pnpm * temp proxy * no include request headers * clean up * proper path * renaming * fmt * update caddyfile * different strategy * use route * fix BACKEND to API * ignore temp * temp remove * back to orig * turn on auto https * disable * route block * clean up * configure host * favicon * add staging domain * http: * set domain adn host * correct bash * matching host * Adds edit feed and image upload (#168) * adds page * image upload and edit feed * update pnpm lock * CSR * vercel json * move * temp disable auth * set image * fix query * submisison service running * Migrates submission service, is running (#169) * init * wip * clean up * feed list clean up * break up functions * fix config path * adds plugins route and integrates with plugin service * remote curate.config.json * plugins table * adds plugin pages * set type * fix feed types * plguin errors * env injection * fix queries * fix migration * fix migration * fix migration * redo migration * decouples moderation * fix status * fix feeds * hide moderation actions * adds overwrite script * migrate timestamps * better date handling --------- Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com> Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
* Get basic working (#109) * Get basic working * adds rss feeds * added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed * fixes to config for grants, sui, and telegram channels (#102) * add query param for selective processing (#103) * adds query param to process * add query param for processing * simplify * add tags * Feat: implement frontend leaderboard (#93) * feat: implement frontend leaderboard * feat: implement a leaderboard in frontend * feat: implemented leaderboard * fix: rebuild implement leaderboard * fix: prettier * fix: prettier * fix: reimplement frontend leaderboard * fix: implement frontend leaderboard * approval rate * sets approval rate and hides curator --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * remove tailwind-scrollbar * added bob to desci feed * Get basic working * set .env.example * nitpicks --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@everything.dev> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> * fix polyfills * Explore Page (#108) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header + Explore Page Style (#113) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header Updates + Web3Auth getUserInfo + Explore Page changes * fmt * coderabbit comments resolved * Profile page (#120) * Update the FE to have the profile page (header and tabs init) * Move tabs to it's own component * Add stats and top badges to overview * Finish the overview tab * Update overview page and init content page * feat(profile-page): add Content and My Feed tags * feat(profile-page): finish profile page static UI * refactor: fmt * [FEATURE] Create Feed Page - DRAFT (#121) * Curate Engine Step 1 * content-progress-configuration step-1 * Curation Settings Part 2 and 3 * CodeRabbit Comments Resolved + Mobile Responsive * Responsiveness: empty State, JSON check --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * update to main * fmt * Feat/submissions page (#127) * Submissions Page + Feed Page + Mobile Responsiveness * fixes * craete-feed authenticated user condition * fmt * remove sqlite --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * Feed Page Tabs (#130) * set tanstack routes (#132) * [Task]: Add connect button to feed page (#131) * feat: Add connect button to feed page * fix: recommit * added back to stablecoins feed since stablewatch forked their own * fix packages, update pg, and ignore cloudflare sockets * fmt --------- Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * uses prod data * Update changes to latest staging * Revert "Update changes to latest staging" This reverts commit cd12908. * Fix Sort By Oldest (#136) * fix: Sort By Oldest * fix: Sort By Oldest * fix: Fix RecentSubmissions Sort Order Update * fix: All feed should be hidden, remove double title --------- Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com> * UI fixes (#138) * UI fixes * fmt --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * Fix: Leaderboard improvements (#140) * fix: Leaderboard improvements * fix: fmt * reorganize * remove unused * rename * clean up * fmt --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * clean up * wallet wip * todo * auth flow, wip * types clean up * fix types * login modal wip * modals * controller, service, successful create account * clean with data, metadata, and pattern, validation, and json schema * add migration doc * add activity and delete user * fix migration * add seed remote method * fix naming * fix script call * file extension * remove build schema * proper build time * fix Dockerfile * rsbuild * Standard Header Component + Responsivenss Fixes (#146) * Standard Header Component + Responsivenss Fixes * fmt * rename Hero --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * fix broken link * don't distribute on staging * fix path * env log * comment out * railway env * fix: Profile adjustments (#153) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * Login Modal Fixes (#154) * Login Modal Fixes * Resolve Comments * container * container fixes --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * organize * fmt * update feeds (#156) * Leaderboard width fixes * feat: save profile image to pinata (#158) * feat(fe): save profile image to pinata * fix: fix comment * Feat Integrate NEAR Solana, Ethereum wallet selection (#159) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * feat: Integrate NEAR wallet selection * fix: run fmt * fix: add function create accesstokenpayload use wallet selector near * fix: resolve conversation * Feed Submission + Feed Review Page (#160) * Feed Review Page and Feed Creation * fmt * coderabbit comments resolved * comments resolved * comments resolved * reset routeTree * minor fixes (#164) * minor fixes * fmt * remove node-compile-cache * reuse user menu * header clean up * remove how it works * clean up * set submissions at root route * fmt * clean * create is coming soon * clean up * user link * Adds caddyfile and frontend clean up (#165) * removes serve static from backend * fmt * fix build * adds caddyfile * clean up submission feed * pnpm lock * fix turbo * fix build * db migration * without time zone * cleans up submission list * Adds shared-db, types package, initial migration (#166) * init * upgrade tsconfigs * shared-db build * shared-db wip * transfer getAllSubmissions * hooked up * moves to shared-db * fmt * update dockerfile * monorepo * working build * migration service * turbo * install pnpm * temp proxy * no include request headers * clean up * proper path * renaming * fmt * update caddyfile * different strategy * use route * fix BACKEND to API * ignore temp * temp remove * back to orig * turn on auto https * disable * route block * clean up * configure host * favicon * add staging domain * http: * set domain adn host * correct bash * matching host * Adds edit feed and image upload (#168) * adds page * image upload and edit feed * update pnpm lock * CSR * vercel json * move * temp disable auth * set image * fix query * submisison service running * Migrates submission service, is running (#169) * init * wip * clean up * feed list clean up * break up functions * fix config path * adds plugins route and integrates with plugin service * remote curate.config.json * plugins table * adds plugin pages * set type * fix feed types * plguin errors * env injection * fix queries * fix migration * fix migration * fix migration * redo migration * decouples moderation * fix status * fix feeds * hide moderation actions * adds overwrite script * migrate timestamps * better date handling * fix --------- Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com> Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
* Get basic working (#109) * Get basic working * adds rss feeds * added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed * fixes to config for grants, sui, and telegram channels (#102) * add query param for selective processing (#103) * adds query param to process * add query param for processing * simplify * add tags * Feat: implement frontend leaderboard (#93) * feat: implement frontend leaderboard * feat: implement a leaderboard in frontend * feat: implemented leaderboard * fix: rebuild implement leaderboard * fix: prettier * fix: prettier * fix: reimplement frontend leaderboard * fix: implement frontend leaderboard * approval rate * sets approval rate and hides curator --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * remove tailwind-scrollbar * added bob to desci feed * Get basic working * set .env.example * nitpicks --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@everything.dev> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> * fix polyfills * Explore Page (#108) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header + Explore Page Style (#113) * Explore Page - commit-1 * Explore Page - commit-2 * explore page - commit-3 * explore page - commit - 4 * explore page - commit - prettier * explore page responsiveness + code Rabbit Comments * code Rabbit Comments resolved * css updates * css changes 2 * header update + mobile responsive * conflicts resolved * Rebase and changes * Fix fmt * Header Updates + Web3Auth getUserInfo + Explore Page changes * fmt * coderabbit comments resolved * Profile page (#120) * Update the FE to have the profile page (header and tabs init) * Move tabs to it's own component * Add stats and top badges to overview * Finish the overview tab * Update overview page and init content page * feat(profile-page): add Content and My Feed tags * feat(profile-page): finish profile page static UI * refactor: fmt * [FEATURE] Create Feed Page - DRAFT (#121) * Curate Engine Step 1 * content-progress-configuration step-1 * Curation Settings Part 2 and 3 * CodeRabbit Comments Resolved + Mobile Responsive * Responsiveness: empty State, JSON check --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * update to main * fmt * Feat/submissions page (#127) * Submissions Page + Feed Page + Mobile Responsiveness * fixes * craete-feed authenticated user condition * fmt * remove sqlite --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * Feed Page Tabs (#130) * set tanstack routes (#132) * [Task]: Add connect button to feed page (#131) * feat: Add connect button to feed page * fix: recommit * added back to stablecoins feed since stablewatch forked their own * fix packages, update pg, and ignore cloudflare sockets * fmt --------- Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * uses prod data * Update changes to latest staging * Revert "Update changes to latest staging" This reverts commit cd12908. * Fix Sort By Oldest (#136) * fix: Sort By Oldest * fix: Sort By Oldest * fix: Fix RecentSubmissions Sort Order Update * fix: All feed should be hidden, remove double title --------- Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com> * UI fixes (#138) * UI fixes * fmt --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * Fix: Leaderboard improvements (#140) * fix: Leaderboard improvements * fix: fmt * reorganize * remove unused * rename * clean up * fmt --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * clean up * wallet wip * todo * auth flow, wip * types clean up * fix types * login modal wip * modals * controller, service, successful create account * clean with data, metadata, and pattern, validation, and json schema * add migration doc * add activity and delete user * fix migration * add seed remote method * fix naming * fix script call * file extension * remove build schema * proper build time * fix Dockerfile * rsbuild * Standard Header Component + Responsivenss Fixes (#146) * Standard Header Component + Responsivenss Fixes * fmt * rename Hero --------- Co-authored-by: Elliot Braem <elliot@ejlbraem.com> * fix broken link * don't distribute on staging * fix path * env log * comment out * railway env * fix: Profile adjustments (#153) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * Login Modal Fixes (#154) * Login Modal Fixes * Resolve Comments * container * container fixes --------- Co-authored-by: Elliot Braem <elliot@everything.dev> * organize * fmt * update feeds (#156) * Leaderboard width fixes * feat: save profile image to pinata (#158) * feat(fe): save profile image to pinata * fix: fix comment * Feat Integrate NEAR Solana, Ethereum wallet selection (#159) * fix: Leaderboard improvements * fix: fmt * fix: Profile adjustments * fix: resolve conversation * feat: Integrate NEAR wallet selection * fix: run fmt * fix: add function create accesstokenpayload use wallet selector near * fix: resolve conversation * Feed Submission + Feed Review Page (#160) * Feed Review Page and Feed Creation * fmt * coderabbit comments resolved * comments resolved * comments resolved * reset routeTree * minor fixes (#164) * minor fixes * fmt * remove node-compile-cache * reuse user menu * header clean up * remove how it works * clean up * set submissions at root route * fmt * clean * create is coming soon * clean up * user link * Adds caddyfile and frontend clean up (#165) * removes serve static from backend * fmt * fix build * adds caddyfile * clean up submission feed * pnpm lock * fix turbo * fix build * db migration * without time zone * cleans up submission list * Adds shared-db, types package, initial migration (#166) * init * upgrade tsconfigs * shared-db build * shared-db wip * transfer getAllSubmissions * hooked up * moves to shared-db * fmt * update dockerfile * monorepo * working build * migration service * turbo * install pnpm * temp proxy * no include request headers * clean up * proper path * renaming * fmt * update caddyfile * different strategy * use route * fix BACKEND to API * ignore temp * temp remove * back to orig * turn on auto https * disable * route block * clean up * configure host * favicon * add staging domain * http: * set domain adn host * correct bash * matching host * Adds edit feed and image upload (#168) * adds page * image upload and edit feed * update pnpm lock * CSR * vercel json * move * temp disable auth * set image * fix query * submisison service running * Migrates submission service, is running (#169) * init * wip * clean up * feed list clean up * break up functions * fix config path * adds plugins route and integrates with plugin service * remote curate.config.json * plugins table * adds plugin pages * set type * fix feed types * plguin errors * env injection * fix queries * fix migration * fix migration * fix migration * redo migration * decouples moderation * fix status * fix feeds * hide moderation actions * adds overwrite script * migrate timestamps * better date handling * fix * Adds auth (#174) * adds fastintear auth, init * auth flow * fmt * adds fastintear auth, init * auth flow * fmt * frontend auth * auth middleware * feed protection * fmt * moderation wip * update lock * migration * moderation actions * hide moderation actions * hack * fix flow * enable hosted service * adds user identities and connect platform * create profile * ensureUserExists * set network for staging * near account id * auth provider id not null * init near * fix monorepo build * fmt * user clean up * update moderation * switch to crosspost connected * fix user id and error * server side * moderation hooks * cleaner logs * Update apps/api/src/services/moderation.service.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update apps/app/src/lib/near.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update apps/app/src/lib/near.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * adds feature flags and moderation service clean up --------- Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com> Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com> Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com> Co-authored-by: ethnclark <ethanclark1310@gmail.com> Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit