Welcome to the official repository for the Ziver App MVP. This project is the foundational step towards building a pioneering multi-blockchain platform designed to revolutionize user engagement through reward-based incentives and decentralized finance (DeFi), delivered as a Telegram Mini App (TMA).
This initial version (MVP) focuses on delivering the core user experience: a simple and engaging way for users to join the ecosystem, earn points, and establish their on-chain reputation through our simplified Social Capital Score.
- User Authentication: Secure user registration and login functionality.
- Mining Hub: A central dashboard where users can initiate "mining" sessions to earn Ziv Points (ZP).
- Daily Streak: A mechanism to reward users for consecutive daily engagement.
- Social Capital Score (Simplified): A points-based system that rewards users for various in-app activities:
- Daily Login: 1-10 points
- Mining Click: 5-15 points
- Task Completion: 1-8 points (Placeholder)
- Successful Referrals: 10-20 points (Placeholder)
- Task & Referral Placeholders: UI elements and backend routes outlined for future implementation.
This project is built with a modern, scalable, and efficient technology stack:
- Frontend: React.js
- Backend: Node.js with Express.js
- Database: PostgreSQL
The project is organized into a monorepo structure with two main directories: client for the frontend and server for the backend.
ziver-app/ ├── client/ # Frontend React Code ├── server/ # Backend Node.js/Express Code └── README.md
Follow these instructions to get a local copy of the project up and running for development and testing purposes.
Make sure you have the following software installed on your machine:
- Node.js (which includes npm)
- PostgreSQL
-
Navigate to the server directory:
cd server -
Install NPM packages:
npm install
-
Create an environment file: Create a file named
.envin theserver/directory and add the following variables. This file stores sensitive information like your database connection string.# .env DATABASE_URL="postgresql://<YOUR_DB_USER>:<YOUR_DB_PASSWORD>@localhost:5432/<YOUR_DB_NAME>" PORT=5000 JWT_SECRET="<YOUR_VERY_SECRET_JWT_KEY>" -
Set up the PostgreSQL database: Make sure your PostgreSQL server is running and you have created a database with the name you specified in the
.envfile. -
Run the server:
npm run dev
The backend server should now be running on
http://localhost:5000.
- Navigate to the client directory (from the root):
cd client - Install NPM packages:
npm install
- Run the client:
The React development server will start, and you can view the application in your browser, typically at
npm start
http://localhost:3000.
The following API endpoints will be developed for the MVP:
POST /api/auth/register- Register a new user.POST /api/auth/login- Log in an existing user.
GET /api/user/me- Get the logged-in user's profile data (ZP balance, score, etc.).POST /api/user/activity- Log a user activity to update their Social Capital Score.
POST /api/mining/claim- Claim ZP from a mining session.
This README is a living document and will be updated as the project evolves.