Skip to main content

IdeaHub

3 min read
Active Project
Type:
Personal Tool
Status:
Active
Project:
Solo Project
Table of contents

Current Status

IdeaHub Alpha is currently live and being used for capturing product ideas and thoughts.

Problem

Product ideas and thoughts related to them were scattered across multiple applications and notes.

Context was getting lost.

Technical Decisions

1. Centralized Authentication

Integrated Auth Service to keep authentication centralized across personal products.

2. Soft Delete

Implemented soft delete for product ideas.

Why?

If a user accidentally deletes a product idea, they should not lose all associated thoughts.

Benefit

Projects can be restored from Bin.

Challenges & Mistakes Encountered

Drizzle .returning() Issue

What Happened

The product thought was successfully created in the database.

However, the API was returning 500 errors.

Initial Assumption

I thought the create operation itself was failing.

Investigation

After 10-15 minutes of debugging, I discovered the issue.

Root Cause

I had forgotten to use .returning() on the Drizzle query.

Lesson

Database success does not automatically mean API success.

Debugging

Delete Thought API Returning 500

What Happened

Deleting a thought returned a 500 error.

However, after refreshing the page, the thought had already been deleted from the database.

Investigation

I repeatedly tested the flow because the operation was succeeding despite the error.

Root Cause

Incorrect NextResponse implementation.

Fix

Corrected the response construction.

Debugging

Partial Unique Index Edge Case

Problem

User deletes an idea.

Later creates another idea with the same title.

Unique slug constraint fails.

First Solution

Implemented composite unique index:

slug + isDeletedAt

This solved the initial problem.

New Edge Case

If the same slug was deleted multiple times, uniqueness violations still occurred.

Final Solution

While debugging, I learned about Partial Unique Indexes.

Applied uniqueness only on active rows.

Lesson

Learned advanced indexing concepts and soft-delete database design.

Limitations

1. Internet Dependency

User must be online to use the platform.

2. Session Expiry

Users are logged out after session expiry.

Access and Refresh Tokens have not been implemented yet.

3. Thought Capture Friction

Users must first navigate into a specific product before capturing thoughts.

Problem

This introduces friction.

Realization

Capturing and organizing should not be forced into a single step.

Impact

IdeaHub Alpha is currently live and actively used as a personal tool for capturing product ideas and thoughts.

Future Vision

1. PWA Support

Allow users to install the application and use it in offline and online modes.

2. Access & Refresh Tokens

Improve session management.

3. Universal Thought Capture

Allow users to capture thoughts immediately and organize them later.

Reduce friction in the capture process.

Technologies Used

Next.jsDrizzle ORMPostgreSQLAuth Service

Related Projects

Lakshay Mahajan

Backend Engineer focused on building reliable systems with Node.js, MongoDB, and AWS.

Connect

© 2026 Lakshay Mahajan