A modern, real-time cryptocurrency tracking and analytics application built with React, TypeScript, and Express. Track live crypto prices, create watchlists, set price alerts, and view interactive charts for your favorite digital assets.
- Real-time Price Tracking: Live cryptocurrency price updates via WebSocket
- Interactive Charts: Visualize price history with Chart.js
- Watchlists: Create custom watchlists to track your favorite cryptocurrencies
- Price Alerts: Set up notifications when prices hit your target values
- Dark Mode: Beautiful dark theme powered by Tailwind CSS
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Market Analytics: View market cap, volume, 24h changes, and more
- React 18 with TypeScript
- Vite for fast development and optimized builds
- TailwindCSS for styling
- shadcn/ui components (Radix UI primitives)
- TanStack Query for server state management
- Chart.js for data visualization
- Wouter for routing
- Express.js with TypeScript (ESM)
- PostgreSQL with Drizzle ORM
- WebSocket (ws) for real-time updates
- Passport.js for authentication
- CoinGecko API for cryptocurrency data
- Node.js 18+ and npm
- PostgreSQL database (recommended: Neon Database free tier)
git clone https://github.com/yourusername/CryptoPulse.git
cd CryptoPulsenpm installCreate a .env file in the root directory:
DATABASE_URL=postgresql://user:password@host:5432/cryptopulse
PORT=5000
NODE_ENV=development
SESSION_SECRET=your-secret-key-hereSee .env.example for detailed configuration options.
Push the database schema:
npm run db:pushnpm run devOpen http://localhost:5000 in your browser.
| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β Yes | - |
PORT |
Server port | β No | 5000 |
NODE_ENV |
Environment (development or production) |
β No | development |
SESSION_SECRET |
Secret key for session encryption | β Yes | - |
- Sign up at neon.tech
- Create a new project
- Copy the connection string
- Add to your
.envfile asDATABASE_URL
npm run buildThis creates:
dist/public/- Frontend static assetsdist/index.js- Backend server bundle
npm start-
Push to GitHub
git init git add . git commit -m "Initial commit" git remote add origin https://github.com/yourusername/CryptoPulse.git git push -u origin main
-
Import to Vercel
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
- Vercel will auto-detect the build settings
-
Configure Environment Variables
In Vercel dashboard β Settings β Environment Variables, add:
DATABASE_URL- Your Neon database connection stringSESSION_SECRET- A random secret key (generate one)
-
Deploy
Click "Deploy" and wait for the build to complete!
CryptoPulse/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utilities & helpers
β β βββ pages/ # Page components
β βββ index.html
βββ server/ # Express backend
β βββ index.ts # Server entry point
β βββ routes.ts # API routes
β βββ storage.ts # Database abstraction
β βββ vite.ts # Vite integration
βββ shared/ # Shared types & schemas
β βββ schema.ts # Database schema (Drizzle)
βββ package.json
βββ vite.config.ts
βββ drizzle.config.ts
βββ tsconfig.json
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm start |
Run production server |
npm run check |
TypeScript type checking |
npm run db:push |
Push database schema changes |
- Verify
DATABASE_URLis correct in.env - Ensure database is running and accessible
- Check firewall/network settings
- Clear
node_modulesand reinstall:rm -rf node_modules package-lock.json && npm install - Ensure Node.js version is 18+
- Run
npm run checkto identify TypeScript errors
- Change
PORTin.envfile - Kill process using port 5000:
npx kill-port 5000
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- CoinGecko API for cryptocurrency data
- shadcn/ui for beautiful UI components
- Neon Database for serverless PostgreSQL
Built with β€οΈ using React & Express