Welcome to the CryptoCore Backend! This Node.js and Express.js API powers the CryptoCore app by providing real-time cryptocurrency data, user authentication with JWT, and secure database interactions.
- JWT-based authentication for secure user login and registration.
- Middleware to protect routes and manage user sessions.
- Fetches real-time cryptocurrency prices, market trends, and stats from public APIs.
- Efficient data caching to optimize performance.
- Aggregates news articles from various trusted crypto sources.
- Filters and sorts news based on relevance.
- User registration and login functionality.
- Profile management and watchlist support.
- Node.js: JavaScript runtime for backend development.
- Express.js: Web framework for building RESTful APIs.
- JWT: JSON Web Tokens for secure authentication.
- PostgreSQL: Database for structured data management.
- Prisma: ORM for database interactions.
- Zod: Schema validation for API requests and responses.
crypto-core-backend/
β
βββ src/
β βββ config/ # Config files
β βββ controllers/ # Route logic (auth, crypto data, news)
β βββ cron/ # Cron jobs
β βββ models/ # Database models (Prisma schema)
β βββ routes/ # API endpoints
β βββ middleware/ # Auth and error-handling middleware
β βββ validations/ # Helper functions (validation, formatting)
β βββ app.js # Server entry point
β
βββ .env # Environment variables
βββ prisma/ # Prisma schema
βββ package.json # Project dependencies
βββ tsconfig.json # Typescript config
βββ README.md # You're here!
- Node.js: Install Node.js
- PostgreSQL: Install PostgreSQL
- Prisma CLI: Install Prisma
-
Clone the repository:
git clone https://github.com/ishanbhagwate/crypto-core-backend.git cd crypto-core-backend -
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.envfile in the root directory. - Add the following variables:
DATABASE_URL=your_postgres_url JWT_SECRET=your_jwt_secret API_KEY=your_crypto_api_key
- Create a
-
Run database migrations:
npx prisma migrate dev
-
Start the server:
npm start
Contributions are welcome! To contribute:
- Fork this repository.
- Create a new branch:
git checkout -b feature-name - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or feedback:
- Email: ishanbhagwate29@gmail.com
- LinkedIn: Ishan Bhagwate
If you like this project, don't forget to give it a βοΈ!