This repository showcases an advanced cloud image storage solution. The project encompasses two distinct subscription tiers: FREE and PRO. In the FREE tier, users can upload one image at a time, with a one-hour interval between uploads, while the PRO tier, available at a $5 monthly cost, affords users the convenience of uploading multiple images simultaneously without time-based constraints. The integration of Stripe for payments ensures secure and efficient transaction processing.
The completed project can be accessed live at: https://commonstore.abdulvajid.com
The following tools were utilized for the project:
- Programming language - TypeScript
- Backend: Node, Express
- Frontend: React, Redux
- Database: MongoDB, Mongoose
- Payment gateway - Stripe
- Backend architecture: MVC with repository pattern
- CSS framework: Tailwind CSS
- libraries: cloudinary, node-scheduler, bcryptjs, morgan, helmet, joi, yup, formik, axios, vite, react-toastify, jsonwebtoken, moment-timezone, dotenv, multer.
- Node.js and Yarn should be installed on your system.
- MongoDB server should be running.
Open a terminal and run the following command to clone this project:
git clone https://github.com/abdul-vajid/Common-Image-Store.git
Navigate to the backend
directory within the cloned project using the command:
cd Common-Image-Store/backend
Run the following command to install nodemon globally. This will help with server restarts during development.
yarn global add nodemon
Run the following command to install the required packages locally for the project.
yarn install
- Rename the
sample.env
file to.env
- Open the
.env
file and fill in your configuration details, such as the database URL, Stripe API keys, Cloudinary API keys, etc.
Run the following command to start the Node.js server. Nodemon will automatically restart the server on code changes.
yarn dev
Navigate back to the root
directory of the cloned project using the command:
cd ..
Navigate to the frontend
directory within the cloned project using the command:
cd frontend
Navigate back to the root directory of the cloned project using the command:
yarn install
If you wish to run the frontend with a local backend server instead of the hosted server, you will need to modify the apiConfig.ts
file. Follow these steps:
- Navigate to the
apiConfig.ts
file located atCommon-Image-Store/frontend/src/app/config/apiConfig.ts
- Open the
apiConfig.ts
file in a editor. - Locate the
BASE_URL
variable and replace it with the local backend server URL. For example:
// Before
const BASE_URL = "https://commonimagestore.abdulvajid.com/api/v1";
// After
export const baseURL = 'http://localhost:5000/api/v1';
Run the following command to start the React frontend server.
yarn dev
Thank you for following these deployment instructions to set up the Common Image Store project. By following these steps, you've successfully configured the backend and frontend components.
For any questions or clarifications, please feel free to contact me at [email protected]