-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme.me
84 lines (74 loc) · 1.88 KB
/
Readme.me
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# MetaConnect
MetaConnect is an application that integrates the metaverse and virtual reality, supporting various digital payment methods.
## System Requirements
- Node.js (>= 14.x)
- MongoDB
## Project Structure
```
MetaConnect/
├── backend/
│ ├── models/
│ │ ├── User.js
│ │ └── Transaction.js
│ ├── routes/
│ │ └── transactions.js
│ ├── server.js
│ └── .env
├── frontend/
│ ├── package.json
│ ├── next.config.js
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Header.js
│ │ │ ├── Footer.js
│ │ ├── pages/
│ │ │ ├── index.js
│ │ │ └── profile.js
│ │ └── styles/
│ │ └── globals.css
└── README.md
```
## Setup Instructions
### Backend
1. Navigate to the `backend` folder:
```bash
cd backend
```
2. Install dependencies:
```bash
npm install express mongoose dotenv cors bcrypt
```
3. Create a `.env` file with your MongoDB connection string:
```
MONGO_URI=your_mongodb_connection_string
PORT=5000
```
4. Start the server:
```bash
npm start
```
### Frontend
1. Navigate to the `frontend` folder:
```bash
cd frontend
```
2. Install dependencies:
```bash
npm install
```
3. Start the development server:
```bash
npm run dev
```
## API Endpoints
### Transactions
- **POST /api/transactions/deposit**
- Request Body: `{ "userId": "user_id", "amount": amount }`
- Description: Process a deposit transaction.
- **POST /api/transactions/withdraw**
- Request Body: `{ "userId": "user_id", "amount": amount }`
- Description: Process a withdrawal transaction.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
```