A two-sided marketplace website that allows dog owners to find dog sitters and dog services easily and quickly, while providing dog sitters jobs. It has a real time notification and messaging system to allow real time communication. Search easily to find the perfect dog sitter based on rating, location, and even pay rate. Easy and quick payment and personal profiles setups. Also create your own schedule, for when you want to work as a sitter.
This is a MERN application:
- MongoDB
- ExpressJS
- React
- NodeJS
- Amazon S3
- Stripe
- MapQuest
This is the necessary .env file needed to run the application:
MONGODB_URI=<MONGODB_URI>
ACCESS_TOKEN_NAME=<ACCESS_TOKEN_NAME>
ACCESS_TOKEN_SECRET=<ACCESS_TOKEN_SECRET>
ACCESS_TOKEN_LIFE=<ACCESS_TOKEN_LIFE>
AWSAccessKeyId=<AWSAccessKeyId>
AWSSecretKey=<AWSSecretKey>
S3_BUCKET=<S3_BUCKET>
STRIPE_KEY=<STRIPE_KEY>
STRIPE_SECRET=<STRIPE_SECRET>
RETURN_PAYMENT_LINK=<RETURN_PAYMENT_LINK>
MAP_QUEST_KEY=<MAP_QUEST_KEY>
RETURN_PAYMENT_LINK=<RETURN_PAYMENT_LINK>
ACCESS_TOKEN_NAME, ACCESS_TOKEN_SECRET, ACCESS_TOKEN_LIFE is used for passport-jwt
server
|-----bin
| └---- www* # HTTP Server entry point
|-----controllers # The logic for routes
|-----middleware # Custom ExpressJS middleware modules
|-----models # Database Schema models for MongoDB
|-----routes # Express server API endpoints
|-----test # Unit server testing files
|-----utils # Utility module files
└-----scripts # Any automation scripts files
- User and Profile refer to MongoDB Document objects.
- Responses are always JSON unless stated.
- Body may only be some properties of the Document object.
End Point | Method | Private/Protected Route | Params | Body | Status | Response |
---|---|---|---|---|---|---|
/welcome | GET | 200 | text | |||
/ping | POST | {teamName: String} | 200 | text | ||
/profile/create | POST | Profile | 201 | Profile | ||
/profile/:id | PUT | {id: String} | Profile, {email: String} | 200 | Profile | |
/profile | GET | 200 | [Profile] | |||
/profile/me | GET | Yes | 200 | Profile | ||
/profile/:id | GET | {id: String} | 200 | Profile | ||
/user/me | GET | Yes | 200 | {user: User} | ||
/register | POST | User, Profile | 201 | User | ||
/login | POST | {email: String, password: String} | 200 | {user: User} | ||
/logout | POST | Yes | 200 | {user: User} | ||
/upload | POST | Yes | Multipart/Form-data | {url: String} | ||
/upload/delete | PUT | Yes | 200 | |||
/payment/methods | POST | Yes | {card_id: String, user_id: string} | 201 | Profile | |
/payment/methods | GET | Yes | 200 | {data} | ||
/payment/account | POST | Yes | {email: String, profile_id: String} | 201 | {accountLink} | |
/payment/account/validate/:id | GET | Yes | {id: String} | 200 | {account} | |
/request/me | GET | Yes | 200 | [Request] | ||
/request/requests | GET | Yes | 200 | [Request] | ||
/request/create | POST | Yes | Request | 200 | Request | |
/request/update/:id | PUT | Yes | {id: String} | Request | 200/204 | Request/None |
/request/:id/pay | POST | Yes | {id: String} | {amount: Float} | 200 | {paymentIntent} |
- Go to /server
- Create necessary .env with required environment variables (look up for example)
- Make .env is in /server
- Install module dependencies with command npm install
- Run the server with the command npm run debug
- Server runs on http://localhost:3001
client
|-----public # Static files
└-----src
|-----components # React components
|-----contexts # Custom contexts for application
|-----data # Any necessary config files or API public keys
|-----hooks # Custom made React hooks
|-----pages # Complete renderable views
|-----themes # Configurable Material-UI files for custom styling
|-----services # Anything relative to backend or API calls
|-----App.js # Routes and global contexts applied here
└-----index.js # Entry point of frontend
Route | Private/Protect |
---|---|
/ | |
/signup | |
/login | |
/profiles | |
/profiles/:id | |
/me | Yes |
/become-a-sitter | Yes |
/my-sitters | Yes |
/my-jobs | Yes |
/messages | Yes |
Route | Private/Protected |
---|---|
/edit-profile | Yes |
/profile-photo | Yes |
/payment | Yes |
/security | Yes |
/settings | Yes |
/availability | Yes |
- Go to /client
- Install module dependencies with command npm install
- Run the server with the command npm start for developer server
- Server runs on http://localhost:3000
- You can run npm run build for production ready application