Pawsome is a comprehensive platform designed to provide pet owners with valuable resources, expert advice, and a community-driven space to better care for their pets. This project aims to bridge the gap between pet owners and essential pet care information, fostering a community where users can access premium content, share experiences, and find guidance on a range of topics, from health and nutrition to training and daily care.
The Pawsome platform offers users access to a mix of free and premium content, including detailed guides, tips, and personalized advice tailored to various types of pets. Users can choose between different subscription plans to unlock premium content and gain exclusive insights from pet care experts.
- Programming Language: TypeScript
- Framework: Express.js
- Database: MongoDB
- ODM: Mongoose
- Validation Library: Zod
- Authentication: JSON Web Tokens (JWT)
-
User Authentication & Authorization
- Secure Registration and Login System
- Role-Based Access Control (Admin and User roles)
- Profile Management and Updates
-
Content Management
- Create, Read, Update, and Delete Posts
- Premium Content Access Control
- Comment System for Community Engagement
- Rich Media Support with Image Upload
-
Payment Integration
- Subscription Plan Management
- Secure Payment Processing via AmarPay
- Premium Content Access Control
-
User Experience
- Email Notifications via Nodemailer
- Input Validation and Error Handling
- Responsive API Design
- User Profile Customization
Follow this step-by-step guide to run the server on your local machine.
First, clone the repository to your machine using the following command:
git clone https://github.com/saifscripts/pawsome-server.git
Next, navigate to the project directory with this command:
cd pawsome-server
Before running the app, you need to install all dependencies. You can do this using either Yarn or npm.
yarn install
npm install --legacy-peer-deps
To run the app, create a .env file in the root folder with the following properties (I have included a few demo values here for testing):
NODE_ENV=development
PORT=5000
DB_URI=mongodb://localhost:27017/bike-rental
BASE_URL=http://localhost:5000
CLIENT_BASE_URL=http://localhost:3000
BCRYPT_SALT_ROUNDS=12
JWT_ACCESS_SECRET=demo_secret
JWT_REFRESH_SECRET=demo_secret
JWT_RESET_SECRET=demo_secret
JWT_ACCESS_EXP_IN=7d
JWT_REFRESH_EXP_IN=365d
JWT_RESET_EXP_IN=10M
STORE_ID=aamarpaytest
SIGNATURE_KEY=your_signature_key
PAYMENT_BASE_URL=https://sandbox.aamarpay.com
MAIL_AUTH_USER=email
MAIL_AUTH_PASS=your_mail_auth_pass
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
Now, you're ready to run the app. Use one of the following commands to start the server.
yarn dev
npm run dev
That's it! The application should now be running locally.