Skip to content
Ritwikcp-ctrlPublic

About

Rank is what you pay , Relevance is where you compete.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

59 Commits

Folders and files

Repository files navigation

BidIndia ๐Ÿ‡ฎ๐Ÿ‡ณ

A public bidding-based advertising platform for Indian businesses

BidIndia is a platform where businesses compete for visibility by bidding for positions on public, category-based leaderboards.

Instead of traditional advertising where businesses continuously compete for impressions through opaque ad auctions, BidIndia makes promotional placement visible:

Businesses pay to compete for attention. Higher eligible spend means higher position on the board.

The initial goal is to build an India-focused advertising and discovery platform covering businesses ranging from restaurants and local services to SaaS, finance, education, healthcare, real estate, and more.


๐Ÿšง Project Status

Status: Active development Stage: MVP / Prototype

The project is being developed with a backend-first approach, with particular attention to:

  • Secure payment processing
  • Transaction integrity
  • Idempotency
  • Concurrent bidding
  • Database transactions
  • Authorization
  • Ranking consistency
  • Analytics
  • Scalable system architecture

๐ŸŽฏ Core Idea

A business creates a listing and participates in a relevant advertising board.

For example:

Restaurants โ†’ Ghaziabad

#1  Business A       โ‚น25,000
#2  Business B       โ‚น18,500
#3  Business C       โ‚น12,000
#4  Business D        โ‚น7,500

A business can increase its promotional spend to compete for a higher position.

The platform transforms advertising placement into a transparent public leaderboard.


๐ŸŒ Example Boards

BidIndia is designed around category + geography.

Examples:

Restaurants โ€” India
Restaurants โ€” Uttar Pradesh
Restaurants โ€” Delhi
Restaurants โ€” Ghaziabad

Finance โ€” India
SaaS โ€” India
Education โ€” India
Healthcare โ€” Noida
Real Estate โ€” Bangalore

This allows both national companies and smaller local businesses to participate in relevant markets.


๐Ÿง  Core System

The conceptual flow is:

                  BUSINESS
                      โ”‚
                      โ–ผ
               CREATE LISTING
                      โ”‚
                      โ–ผ
                  CATEGORY
                      โ”‚
                      โ–ผ
                    BOARD
                      โ”‚
                      โ–ผ
                    BID
                      โ”‚
                      โ–ผ
                  PAYMENT
                      โ”‚
                      โ–ผ
             PAYMENT VERIFICATION
                      โ”‚
                      โ–ผ
              ADVERTISING SPEND
                      โ”‚
                      โ–ผ
               RANKING ENGINE
                      โ”‚
                      โ–ผ
                LEADERBOARD
                      โ”‚
                      โ–ผ
                  VISITORS
                      โ”‚
                      โ–ผ
                 BUSINESS

๐Ÿ—๏ธ Planned Architecture

BidIndia is being built using a separated frontend and backend architecture.

                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   Next.js     โ”‚
                       โ”‚   Frontend    โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                             HTTPS
                               โ”‚
                               โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚ Node.js API   โ”‚
                       โ”‚ TypeScript    โ”‚
                       โ”‚   Express     โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                โ”‚                โ”‚
              โ–ผ                โ–ผ                โ–ผ
        PostgreSQL           Redis       Payment Gateway
              โ”‚
              โ–ผ
        Prisma ORM

๐Ÿ› ๏ธ Technology Stack

Frontend

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS

Backend

  • Node.js
  • Express
  • TypeScript
  • Zod
  • Prisma ORM

Database

  • PostgreSQL

Planned Infrastructure

  • Redis
  • Payment gateway integration
  • Cloud deployment
  • Object storage for business assets

๐Ÿ—ƒ๏ธ Initial Domain Model

The initial backend domain contains:

User
  โ”‚
  โ””โ”€โ”€ Business
          โ”‚
          โ”œโ”€โ”€ Category
          โ”‚
          โ”œโ”€โ”€ BoardMembership
          โ”‚       โ”‚
          โ”‚       โ””โ”€โ”€ Bid
          โ”‚
          โ”œโ”€โ”€ Payment
          โ”‚
          โ””โ”€โ”€ Click

Board
  โ”‚
  โ”œโ”€โ”€ Category
  โ”œโ”€โ”€ BoardMembership
  โ””โ”€โ”€ Click

Main entities

User

Represents a platform account.

Business

Represents the business being advertised.

Category

Defines the business type.

Board

Represents a specific advertising competition such as:

Restaurants โ†’ Ghaziabad

BoardMembership

Connects a business to a specific board.

Bid

Represents promotional spend associated with a board membership.

Payment

Represents the financial transaction independently from advertising spend.

Click

Stores business interaction analytics.


๐Ÿ’ฐ Financial Data Model

Money is represented using integer minor units rather than floating-point values.

For INR:

โ‚น1       = 100 paise
โ‚น500     = 50,000 paise
โ‚น10,000  = 1,000,000 paise

The system is designed so that financial state is derived from verified payment events rather than arbitrary client-provided values.


๐Ÿ” Security Philosophy

Security is a first-class requirement of the project.

The backend will follow principles including:

Never trust the client

The client does not determine:

rank
payment success
final spend
ownership
authorization

Payment verification

The intended flow is:

Client
   โ†“
Create payment
   โ†“
Payment provider
   โ†“
Server-side webhook
   โ†“
Signature verification
   โ†“
Payment validation
   โ†“
Database transaction
   โ†“
Advertising spend
   โ†“
Ranking update

Idempotency

Repeated payment callbacks must not create duplicate financial events.

Authorization

A user must only be able to modify resources they are authorized to manage.

Validation

External input is validated at the application boundary before reaching business logic or the database.

Database integrity

Financial operations and ranking-related state changes will use database transactions where atomicity is required.


โš”๏ธ The Interesting Backend Problem

One of the central engineering challenges is concurrent bidding.

Consider:

Current #2 = โ‚น10,000

Two businesses simultaneously attempt:

Business A โ†’ โ‚น10,001
Business B โ†’ โ‚น10,001

A naive implementation can produce inconsistent results because both requests may read the same previous state.

BidIndia therefore treats bidding as a concurrency-sensitive financial operation and will use appropriate transaction boundaries, database constraints, and idempotency mechanisms.


๐Ÿ“Š Analytics

The platform is intended to provide businesses with measurable advertising performance.

Initial metrics include:

Impressions
Clicks
CTR
Current position
Ranking history
Advertising spend

This lets a business understand not only its position but also whether that position generates useful traffic.


๐Ÿงญ Planned API Structure

The API will evolve around domain-oriented modules.

/api/v1

/auth
/users
/businesses
/categories
/boards
/bids
/payments
/analytics
/admin

The exact API contracts will be documented as implementation progresses.


๐Ÿ“ Planned Project Structure

bidindia/
โ”‚
โ”œโ”€โ”€ web/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ server/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ”œโ”€โ”€ modules/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ users/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ businesses/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ categories/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ boards/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bidding/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ payments/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ analytics/
โ”‚   โ”‚   โ”œโ”€โ”€ app.ts
โ”‚   โ”‚   โ””โ”€โ”€ server.ts
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ prisma/
โ”‚       โ””โ”€โ”€ schema.prisma
โ”‚
โ””โ”€โ”€ README.md

๐Ÿš€ MVP Roadmap

Phase 1 โ€” Foundation

  • Define initial product model
  • Define database domain
  • Initialize Prisma
  • Finalize database schema
  • Configure backend
  • Add application security middleware
  • Add centralized error handling
  • Add health checks

Phase 2 โ€” Identity & Businesses

  • User registration
  • Authentication
  • Authorization
  • Business creation
  • Business management
  • Business profile

Phase 3 โ€” Discovery

  • Categories
  • Boards
  • Geographic boards
  • Public leaderboard
  • Business search

Phase 4 โ€” Bidding

  • Bid creation
  • Bid validation
  • Concurrent bid handling
  • Transaction safety
  • Ranking engine

Phase 5 โ€” Payments

  • Payment creation
  • Payment provider integration
  • Webhook verification
  • Idempotency
  • Refund handling
  • Financial audit trail

Phase 6 โ€” Analytics

  • Impressions
  • Click tracking
  • CTR
  • Ranking history
  • Business analytics dashboard

Phase 7 โ€” Administration

  • Admin authentication
  • Business moderation
  • Payment monitoring
  • Fraud/report handling
  • Category management

Phase 8 โ€” Deployment & Hardening

  • Production deployment
  • HTTPS
  • Rate limiting
  • Security testing
  • Logging
  • Monitoring
  • Backup strategy

๐Ÿงช Engineering Priorities

The project prioritizes the following characteristics:

Correctness
     โ†“
Security
     โ†“
Consistency
     โ†“
Observability
     โ†“
Performance
     โ†“
Scale

The objective is not merely to make the application work, but to understand why the architecture works and what happens when multiple users interact with the system simultaneously.


๐Ÿ”ฎ Future Possibilities

The initial MVP can eventually evolve into a larger business discovery and advertising platform.

Potential future capabilities include:

Local business discovery
Sponsored placements
Advanced analytics
City-level advertising
Category-level advertising
Campaigns
Business subscriptions
Promotional offers
Recommendation systems
Fraud detection
Real-time leaderboard updates

These features are intentionally outside the first MVP.


โš ๏ธ Disclaimer

BidIndia is an independent project inspired by the general concept of transparent pay-to-rank advertising.

It is not affiliated with, endorsed by, or a copy of any particular advertising platform.


๐Ÿ“œ License

License to be determined as the project develops.

About

Rank is what you pay , Relevance is where you compete.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages