get onboard plexer this handles Mintyplex's authentication, authorization, users, storage, etc.
✔️ - done 🚧 - pending/in progress 📋 - backlog
- Design user profile functionality: This allows users to view and edit their profile information (e.g., name, bio, profile picture). ✔️
- Implement profile update functionality: This allows users to modify their profile information and store the changes securely. 🚧
- Integrate profile picture upload/management (optional): This allows users to upload and manage their profile pictures. 🚧
use: https://mintyplex-api.onrender.com/
[GET] to check if the API is up. it's no big deal if it doesn't give a 200
at first.
slide to:
In the root directory of the application, create an 'app.env' file with the following;
# MONGO DB SRV Record
MONGODB_SRV_RECORD="mongodb+srv://minty:plexerbaby@mpacluster0.b8ire6p.mongodb.net/?retryWrites=true&w=majority&appName=mpacluster0"
# DB Variables
MONGODB_DATABASE="minty"
USER_COLLECTION="users"
AVATAR_BUCKET="avatars"
AVATAR_COLLECTION="avatars.files"
`https://mintyplex-api.onrender.com/api/v1/user/users/`
https://mintyplex-api.onrender.com/api/v1/user/profile/
request example-
{
"wallet_address": "xion186n0xxs96rzvnrc8ld66zkywc54xvta0mc5ewx5yvx8tde4xvals8xxekr",
"email": "john.doe@example.com",
"x_link": "x.com/elstsp",
"bio": "i love crypto"
}
https://mintyplex-api.onrender.com/api/v1/user/profile/:id
this route takes the user's id as a parameter. e.g https://mintyplex-api.onrender.com/api/v1/user/profile/660c3aafe22f82232121bbd9
response example-
{
"error": false,
"message": "User Profile",
"user": {
"id": "660c3aafe22f82232121bbd9",
"wallet_address": "xion186n0xxs96rzvnrc8ld66zkywc54xvta0mc5ewx5yvx8tde4xvals8xxekr",
"email": "seanP@gmail.com",
"avatar": "/api/v1/user/avatar/",
"bio": "i love crypto",
"x_link": "x.com/seanP",
"created_at": 1712077487,
"updated_at": 1712077487
}
}
`https://mintyplex-api.onrender.com/api/v1/user/profile/:id`
this route enables users to edit already existing information request example-
{
"email": "seanP@gmail.com",
"bio": "i love crypto",
"x_link": "x.com/seanP",
}
`https://mintyplex-api.onrender.com/api/v1/user/avatar/:id`
users upload their avatars. with any api client of your choice that supports file uploading and under form
select files(this setup works for thunder client in vs code at the time), form name is avatar
, go ahead to select image and send request.
`https://mintyplex-api.onrender.com/api/v1/user/avatar/:id`
`https://mintyplex-api.onrender.com/api/v1/user/avatar/:id`
retrieve users' avatars
`https://mintyplex-api.onrender.com/api/v1/product/:id`
*the ':id' is the user's id which is their wallet address
. to parse/pass this request, recommended is Postman, use form-data
under the Body
, key and value example as follows
request example- { name: Rugged Ruddy price: 300.99 discount: 99.0 description: This is the tale of the burgundy. categories: art categories: forever quantity: 10, tags: crip tags: lrip //to select image, select key type as file and select image image: }
`https://mintyplex-api.onrender.com/api/v1/product/`
this route all gets all existing products in the database
`https://mintyplex-api.onrender.com/api/v1/product/:id`
this route gets one existing product in the database
`https://mintyplex-api.onrender.com/api/v1/product/:id/:uid`
example https://mintyplex-api.onrender.com/api/v1/product/66198ca9102c15fb33d65490/bion186n0xxs96rzvnrc8ld66zkywc54xvta0mc5ewx5yvx8tde4xvals8xxekrzs
this route updates existing product in the database
request example-
{
"name": "Rugged Ruddy",
"price": 300.99,
"discount": 99.0,
"description": "This is the tale of the burgundy.",
"categories": ["axeless", "dull"],
"quantity": 10,
"tags": ["crip", "lrip"]
}
https://mintyplex-api.onrender.com/api/v1/reserve/
request example-
{
"username": "koxdy",
"email": "epphraim@gmail.com"
}