Skip to content

DishankChauhan/index-Chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Indexing Platform

A powerful blockchain indexing platform built on Helius webhooks that enables developers to easily integrate and index Solana blockchain data into their PostgreSQL database.

Features

  • User authentication and database management
  • Customizable data indexing options
  • Real-time blockchain data indexing using Helius webhooks
  • Support for multiple indexing categories:
    • NFT bids and prices
    • Token borrowing availability
    • Token prices across platforms

Tech Stack

  • Next.js with TypeScript
  • PostgreSQL with Prisma ORM
  • Redis for caching and job queues
  • Helius SDK for blockchain integration
  • Docker for development environment

Prerequisites

  • Node.js 18+
  • Docker and Docker Compose
  • Helius API key

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd blockchain-indexer
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env
    # Edit .env with your configuration
  4. Start the development environment:

    docker-compose up -d
  5. Run database migrations:

    npx prisma migrate dev
  6. Start the development server:

    npm run dev
  7. Visit http://localhost:3000 to access the application

Development

  • npm run dev: Start development server
  • npm run build: Build production version
  • npm run start: Start production server
  • npm run test: Run tests
  • npm run lint: Run linting

Deployment

GitHub

Before pushing to GitHub:

  1. Ensure your .gitignore file includes .env and other sensitive files
  2. Check that no API keys or credentials are hardcoded in the source code
  3. Push your code to GitHub:
git add .
git commit -m "Initial commit"
git push origin main

Vercel Deployment

  1. Create an account on Vercel if you don't have one
  2. Install the Vercel CLI:
npm install -g vercel
  1. Login to Vercel:
vercel login
  1. Deploy to Vercel:
vercel
  1. Configure environment variables in the Vercel dashboard:

    • Go to your project in the Vercel dashboard
    • Navigate to "Settings" > "Environment Variables"
    • Add all the variables from your .env.example file with appropriate values
  2. Set up a PostgreSQL database:

    • Create a PostgreSQL database using a service like Supabase or Neon
    • Update the DATABASE_URL environment variable with your production database connection string
    • Run migrations on your production database:
      npx prisma migrate deploy
  3. Set up Redis (optional):

    • For production, consider using a managed Redis service like Upstash or Redis Labs
    • Update the Redis environment variables accordingly
  4. For continuous deployment:

    • Connect your GitHub repository to Vercel
    • Configure build settings in the Vercel dashboard
    • Each push to your main branch will trigger a new deployment

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors