Skip to content

Commit de31e91

Browse files
committed
added networking and academy pages
1 parent a184ba9 commit de31e91

15 files changed

Lines changed: 2765 additions & 23 deletions

backend/database.sql

Lines changed: 783 additions & 9 deletions
Large diffs are not rendered by default.

backend/server.js

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,43 @@ app.use(express.json({
647647

648648
app.use(cookieParser());
649649

650-
// Serve static frontend files BEFORE API routes
650+
// Get all investors from investor_directory table (MUST be before static middleware)
651+
app.get('/api/investors', requireAuth, async (req, res) => {
652+
try {
653+
console.log('Fetching investors from database...');
654+
655+
// Check if table exists first (MySQL syntax)
656+
const tableExists = await dbGet(
657+
`SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = ?`,
658+
['investor_directory']
659+
);
660+
661+
if (!tableExists) {
662+
console.log('investor_directory table does not exist');
663+
return res.json([]);
664+
}
665+
666+
const investors = await dbAll(
667+
`SELECT
668+
id, url, image, name, vc_type, industries, about,
669+
ideal_for, no_of_investments, social_links, portfolio_companies,
670+
contact_name, contact_role, contact_linkedin, error
671+
FROM ${tableName('investor_directory')}
672+
ORDER BY
673+
CASE WHEN LOWER(name) LIKE '%lets venture%' THEN 0 ELSE 1 END,
674+
no_of_investments DESC,
675+
name ASC`
676+
);
677+
678+
console.log(`Found ${investors.length} investors`);
679+
res.json(investors);
680+
} catch (error) {
681+
console.error('Error fetching investors:', error);
682+
res.status(500).json({ error: 'Failed to fetch investors', details: error.message });
683+
}
684+
});
685+
686+
// Serve static frontend files AFTER API routes
651687
const staticDir = path.join(__dirname, '..', 'frontend');
652688
app.use(express.static(staticDir));
653689

@@ -5482,6 +5518,10 @@ app.get('/networking.html', (req, res) => {
54825518
res.sendFile(path.join(staticDir, 'networking.html'));
54835519
});
54845520

5521+
app.get('/academy.html', (req, res) => {
5522+
res.sendFile(path.join(staticDir, 'academy.html'));
5523+
});
5524+
54855525
app.get('/whisper-network.html', (req, res) => {
54865526
res.sendFile(path.join(staticDir, 'whisper-network.html'));
54875527
});

frontend/academy.html

Lines changed: 1286 additions & 0 deletions
Large diffs are not rendered by default.

frontend/create-report.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
376376
</svg>
377377
<span>Email Client</span>
378378
</a>
379+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
380+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
381+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
382+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
383+
</svg>
384+
<span>PitchLense Academy</span>
385+
</a>
379386
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
380387
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
381388
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

frontend/email.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,6 +1798,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
17981798
</svg>
17991799
<span>Email Client</span>
18001800
</a>
1801+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
1802+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1803+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
1804+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
1805+
</svg>
1806+
<span>PitchLense Academy</span>
1807+
</a>
18011808
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
18021809
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
18031810
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

frontend/extension.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
746746
</svg>
747747
<span>Email Client</span>
748748
</a>
749+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
750+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
751+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
752+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
753+
</svg>
754+
<span>PitchLense Academy</span>
755+
</a>
749756
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
750757
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
751758
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

frontend/investment.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
508508
</svg>
509509
<span>Email Client</span>
510510
</a>
511+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
512+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
513+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
514+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
515+
</svg>
516+
<span>PitchLense Academy</span>
517+
</a>
511518
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
512519
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
513520
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

frontend/market.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
838838
</svg>
839839
<span>Email Client</span>
840840
</a>
841+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
842+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
843+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
844+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
845+
</svg>
846+
<span>PitchLense Academy</span>
847+
</a>
841848
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
842849
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
843850
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

frontend/meeting-assistant.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,13 @@ <h3 class="text-lg font-semibold text-white">Navigation</h3>
699699
</svg>
700700
<span>Email Client</span>
701701
</a>
702+
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="/academy.html">
703+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
704+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
705+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
706+
</svg>
707+
<span>PitchLense Academy</span>
708+
</a>
702709
<a class="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/10" href="https://youtu.be/XUuLeXaEIdI" target="_blank">
703710
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
704711
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>

0 commit comments

Comments
 (0)