Skip to content

Commit 950d6c3

Browse files
Merge pull request #15 from Sachinchaurasiya360/feature/ai-job-match
added dsa question
2 parents e107104 + 7ec784c commit 950d6c3

4,003 files changed

Lines changed: 257411 additions & 2754 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/src/App.tsx

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,44 @@ function lazyWithRetry(factory: () => Promise<{ default: ComponentType<unknown>
2222
}
2323

2424
// Public pages
25-
const LandingPage = lazy(() => import("./module/LandingPage/landingPage"));
26-
const LoginPage = lazy(() => import("./module/auth/LoginPage"));
27-
const RegisterPage = lazy(() => import("./module/auth/RegisterPage"));
28-
const VerifyEmailPage = lazy(() => import("./module/auth/VerifyEmailPage"));
29-
const ForgotPasswordPage = lazy(() => import("./module/auth/ForgotPasswordPage"));
30-
const JobBrowsePage = lazy(() => import("./module/student/jobs/JobBrowsePage"));
31-
const JobDetailPage = lazy(() => import("./module/student/jobs/JobDetailPage"));
32-
const JobLandingPage = lazy(() => import("./module/student/jobs/JobLandingPage"));
33-
const ScrapedJobsPage = lazy(() => import("./module/scraped-jobs/ScrapedJobsPage"));
34-
const ScrapedJobDetailPage = lazy(() => import("./module/scraped-jobs/ScrapedJobDetailPage"));
35-
const CompanyListPage = lazy(() => import("./module/student/companies/CompanyListPage"));
36-
const CompanyDetailPage = lazy(() => import("./module/student/companies/CompanyDetailPage"));
37-
const PublicAtsPage = lazy(() => import("./module/student/ats/PublicAtsPage"));
38-
const GrantsPage = lazy(() => import("./module/student/grants/GrantsPage"));
39-
const PublicOpenSourcePage = lazy(() => import("./module/student/opensource/PublicOpenSourcePage"));
40-
const BlogListPage = lazy(() => import("./module/blog/BlogListPage"));
41-
const BlogPostPage = lazy(() => import("./module/blog/BlogPostPage"));
42-
const RecruiterLandingPage = lazy(() => import("./module/recruiter/RecruiterLandingPage"));
43-
const AptitudeCategoriesPage = lazy(() => import("./module/student/aptitude/AptitudeCategoriesPage"));
44-
const AptitudeTopicPage = lazy(() => import("./module/student/aptitude/AptitudeTopicPage"));
45-
const AptitudeCompaniesPage = lazy(() => import("./module/student/aptitude/AptitudeCompaniesPage"));
46-
const DsaTopicsPage = lazy(() => import("./module/student/dsa/DsaTopicsPage"));
47-
const DsaTopicDetailPage = lazy(() => import("./module/student/dsa/DsaTopicDetailPage"));
48-
const DsaCompaniesPage = lazy(() => import("./module/student/dsa/DsaCompaniesPage"));
49-
const DsaPatternsPage = lazy(() => import("./module/student/dsa/DsaPatternsPage"));
50-
const DsaBookmarksPage = lazy(() => import("./module/student/dsa/DsaBookmarksPage"));
51-
const YCCompanyDetailPage = lazy(() => import("./module/student/companies/YCCompanyDetailPage"));
52-
const GovInternshipsPage = lazy(() => import("./module/student/jobs/GovInternshipsPage"));
53-
const ExternalJobDetailPage = lazy(() => import("./module/student/jobs/ExternalJobDetailPage"));
54-
const AptitudeTheoryPage = lazy(() => import("./module/student/aptitude/AptitudeTheoryPage"));
25+
const LandingPage = lazyWithRetry(() => import("./module/LandingPage/landingPage"));
26+
const LoginPage = lazyWithRetry(() => import("./module/auth/LoginPage"));
27+
const RegisterPage = lazyWithRetry(() => import("./module/auth/RegisterPage"));
28+
const VerifyEmailPage = lazyWithRetry(() => import("./module/auth/VerifyEmailPage"));
29+
const ForgotPasswordPage = lazyWithRetry(() => import("./module/auth/ForgotPasswordPage"));
30+
const JobBrowsePage = lazyWithRetry(() => import("./module/student/jobs/JobBrowsePage"));
31+
const JobDetailPage = lazyWithRetry(() => import("./module/student/jobs/JobDetailPage"));
32+
const JobLandingPage = lazyWithRetry(() => import("./module/student/jobs/JobLandingPage"));
33+
const ScrapedJobsPage = lazyWithRetry(() => import("./module/scraped-jobs/ScrapedJobsPage"));
34+
const ScrapedJobDetailPage = lazyWithRetry(() => import("./module/scraped-jobs/ScrapedJobDetailPage"));
35+
const CompanyListPage = lazyWithRetry(() => import("./module/student/companies/CompanyListPage"));
36+
const CompanyDetailPage = lazyWithRetry(() => import("./module/student/companies/CompanyDetailPage"));
37+
const PublicAtsPage = lazyWithRetry(() => import("./module/student/ats/PublicAtsPage"));
38+
const GrantsPage = lazyWithRetry(() => import("./module/student/grants/GrantsPage"));
39+
const PublicOpenSourcePage = lazyWithRetry(() => import("./module/student/opensource/PublicOpenSourcePage"));
40+
const BlogListPage = lazyWithRetry(() => import("./module/blog/BlogListPage"));
41+
const BlogPostPage = lazyWithRetry(() => import("./module/blog/BlogPostPage"));
42+
const RecruiterLandingPage = lazyWithRetry(() => import("./module/recruiter/RecruiterLandingPage"));
43+
const AptitudeCategoriesPage = lazyWithRetry(() => import("./module/student/aptitude/AptitudeCategoriesPage"));
44+
const AptitudeTopicPage = lazyWithRetry(() => import("./module/student/aptitude/AptitudeTopicPage"));
45+
const AptitudeCompaniesPage = lazyWithRetry(() => import("./module/student/aptitude/AptitudeCompaniesPage"));
46+
const DsaTopicsPage = lazyWithRetry(() => import("./module/student/dsa/DsaTopicsPage"));
47+
const DsaTopicDetailPage = lazyWithRetry(() => import("./module/student/dsa/DsaTopicDetailPage"));
48+
const DsaCompaniesPage = lazyWithRetry(() => import("./module/student/dsa/DsaCompaniesPage"));
49+
const DsaPatternsPage = lazyWithRetry(() => import("./module/student/dsa/DsaPatternsPage"));
50+
const DsaBookmarksPage = lazyWithRetry(() => import("./module/student/dsa/DsaBookmarksPage"));
51+
const DsaProblemDetailPage = lazyWithRetry(() => import("./module/student/dsa/DsaProblemDetailPage"));
52+
const YCCompanyDetailPage = lazyWithRetry(() => import("./module/student/companies/YCCompanyDetailPage"));
53+
const GovInternshipsPage = lazyWithRetry(() => import("./module/student/jobs/GovInternshipsPage"));
54+
const ExternalJobDetailPage = lazyWithRetry(() => import("./module/student/jobs/ExternalJobDetailPage"));
55+
const AptitudeTheoryPage = lazyWithRetry(() => import("./module/student/aptitude/AptitudeTheoryPage"));
5556

5657
// Legal pages
57-
const TermsPage = lazy(() => import("./module/legal/TermsPage"));
58-
const PrivacyPage = lazy(() => import("./module/legal/PrivacyPage"));
59-
const ShippingPage = lazy(() => import("./module/legal/ShippingPage"));
60-
const ContactPage = lazy(() => import("./module/legal/ContactPage"));
61-
const RefundPage = lazy(() => import("./module/legal/RefundPage"));
58+
const TermsPage = lazyWithRetry(() => import("./module/legal/TermsPage"));
59+
const PrivacyPage = lazyWithRetry(() => import("./module/legal/PrivacyPage"));
60+
const ShippingPage = lazyWithRetry(() => import("./module/legal/ShippingPage"));
61+
const ContactPage = lazyWithRetry(() => import("./module/legal/ContactPage"));
62+
const RefundPage = lazyWithRetry(() => import("./module/legal/RefundPage"));
6263

6364
// Student pages
6465
const ApplyPage = lazyWithRetry(() => import("./module/student/applications/ApplyPage"));
@@ -299,6 +300,8 @@ function App() {
299300
<Route path="dsa/companies" element={<DsaCompaniesPage />} />
300301
<Route path="dsa/patterns" element={<DsaPatternsPage />} />
301302
<Route path="dsa/bookmarks" element={<ProtectedRoute role="STUDENT"><DsaBookmarksPage /></ProtectedRoute>} />
303+
<Route path="dsa/problem/:slug" element={<DsaProblemDetailPage />} />
304+
<Route path="dsa/companies/:company" element={<DsaCompaniesPage />} />
302305
<Route path="dsa/:slug" element={<DsaTopicDetailPage />} />
303306
<Route path="aptitude" element={<AptitudeCategoriesPage />} />
304307
<Route path="aptitude/companies" element={<AptitudeCompaniesPage />} />

client/src/assets/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/src/lib/query-keys.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,14 @@ export const queryKeys = {
189189
// DSA Practice
190190
dsa: {
191191
topics: (filter?: string) => ["dsa", "topics", filter] as const,
192-
topic: (slug: string) => ["dsa", "topic", slug] as const,
192+
topic: (slug: string, page?: number, filters?: Record<string, string | undefined>) => ["dsa", "topic", slug, page, filters] as const,
193+
problem: (slug: string) => ["dsa", "problem", slug] as const,
193194
progress: () => ["dsa", "progress"] as const,
194195
bookmarks: () => ["dsa", "bookmarks"] as const,
195196
companies: () => ["dsa", "companies"] as const,
196-
company: (name: string) => ["dsa", "company", name] as const,
197+
company: (name: string, page?: number) => ["dsa", "company", name, page] as const,
197198
patterns: () => ["dsa", "patterns"] as const,
198-
pattern: (name: string) => ["dsa", "pattern", name] as const,
199+
pattern: (name: string, page?: number) => ["dsa", "pattern", name, page] as const,
199200
sheets: () => ["dsa", "sheets"] as const,
200201
},
201202
};

client/src/lib/types.ts

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -661,16 +661,10 @@ export interface DsaTopic {
661661
solvedCount: number;
662662
}
663663

664-
export interface DsaSubTopic {
665-
id: number;
666-
name: string;
667-
orderIndex: number;
668-
problems: DsaProblem[];
669-
}
670-
671664
export interface DsaProblem {
672665
id: number;
673666
title: string;
667+
slug: string;
674668
difficulty: string;
675669
leetcodeUrl?: string;
676670
gfgUrl?: string;
@@ -680,8 +674,9 @@ export interface DsaProblem {
680674
codechefUrl?: string;
681675
tags: string[];
682676
companies: string[];
683-
hints?: string;
677+
hints: string[];
684678
sheets: string[];
679+
acceptanceRate?: string;
685680
solved: boolean;
686681
notes?: string | null;
687682
bookmarked?: boolean;
@@ -695,7 +690,39 @@ export interface DsaTopicDetail {
695690
orderIndex: number;
696691
totalProblems: number;
697692
totalSolved: number;
698-
subTopics: DsaSubTopic[];
693+
totalPages: number;
694+
page: number;
695+
problems: DsaProblem[];
696+
}
697+
698+
export interface DsaProblemDetail {
699+
id: number;
700+
title: string;
701+
slug: string;
702+
difficulty: string;
703+
leetcodeId?: number;
704+
leetcodeUrl?: string;
705+
gfgUrl?: string;
706+
articleUrl?: string;
707+
videoUrl?: string;
708+
hackerrankUrl?: string;
709+
codechefUrl?: string;
710+
tags: string[];
711+
companies: string[];
712+
hints: string[];
713+
sheets: string[];
714+
description?: string;
715+
examples?: string;
716+
constraints?: string;
717+
acceptanceRate?: string;
718+
totalAccepted?: number;
719+
totalSubmissions?: number;
720+
similarQuestions?: { title: string; slug: string; difficulty: string; url: string }[];
721+
category?: string;
722+
isPremium: boolean;
723+
solved: boolean;
724+
bookmarked: boolean;
725+
notes?: string | null;
699726
}
700727

701728
export interface DsaProgress {
@@ -728,34 +755,41 @@ export interface DsaBookmarkItem {
728755
id: number;
729756
problemId: number;
730757
title: string;
758+
slug: string;
731759
difficulty: string;
732760
leetcodeUrl?: string;
733761
gfgUrl?: string;
734762
tags: string[];
735763
companies: string[];
736764
sheets: string[];
737-
topicName: string;
738-
topicSlug: string;
765+
acceptanceRate?: string;
739766
solved: boolean;
740767
createdAt: string;
741768
}
742769

743770
export interface DsaCompanyProblem {
744771
id: number;
745772
title: string;
773+
slug: string;
746774
difficulty: string;
747775
leetcodeUrl?: string;
748776
gfgUrl?: string;
749777
tags: string[];
750778
companies: string[];
751-
hints?: string;
779+
hints: string[];
752780
sheets: string[];
753-
topicName: string;
754-
topicSlug: string;
781+
acceptanceRate?: string;
755782
solved: boolean;
756783
bookmarked: boolean;
757784
}
758785

786+
export interface DsaPaginatedProblems {
787+
problems: DsaCompanyProblem[];
788+
total: number;
789+
totalPages: number;
790+
page: number;
791+
}
792+
759793
// Aptitude Practice
760794
export interface AptitudeCategory {
761795
id: number;

0 commit comments

Comments
 (0)