Skip to main content

Installation & Setup

This guide will walk you through how to set up and run both the web and mobile applications of CryptoTrackPro.

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • PostgreSQL database (Optional)

Web App Setup

  1. Clone the repository:
git clone https://github.com/your-username/crypto-tracker.git
cd crypto-tracker/web-app
  1. Install dependencies:
npm install
# or
yarn install
  1. Set up environment variables:
    • Copy the .env.example file to .env.local
    • Fill in the required variables:
DATABASE_URL=your_postgresql_db_url
NODE_ENV=development
JWT_SECRET=your_jwt_secret
COINCAP_API_KEY=your_coincap_api_key # optional
  1. Set up the database (OPTIONAL):
# Run database migrations
npm run db:generate
npm run db:migrate
# or
yarn run db:generate
yarn run db:migrate


# After making changes to schema
npm run db:push
# or
yarn run db:push
  1. Start the development server:
npm run dev
# or
yarn dev
  1. Open http://localhost:3000 in your browser

Mobile App Setup (Future)

The mobile app is currently in development. Instructions will be provided when available.

Running in Production

To build the application for production:

npm run build
npm run start
# or
yarn build
yarn start

Environment Variables

VariableDescriptionRequired
DATABASE_URLPostgreSQL connection stringOptional
JWT_SECRETSecret key for JWT token generationYes
NODE_ENVEnvironment (development/production)Yes