Welcome to the Brownson project repository! This initiative is all about transforming how Brownson, a dynamic food company, manages its operations and connects with its customers.
Our core mission is to develop a robust and intuitive system that seamlessly integrates a powerful e-commerce platform with an efficient production management solution. This will empower Brownson to revolutionize its sales model, moving from traditional channels to a direct-to-customer (D2C) approach, and streamlining its entire value chain from online order placement to efficient product delivery.
This comprehensive system is designed to provide powerful functionalities, including:
- Online E-commerce Store: A user-friendly and responsive interface allowing customers to effortlessly browse products, manage their shopping carts, and complete secure purchases.
- Production Management Suite: Tools for real-time inventory tracking, efficient order processing, intelligent production scheduling, and comprehensive oversight of manufacturing workflows.
- Direct-to-Customer (D2C) Enablement: A streamlined, integrated process that connects online sales directly to production and fulfillment, enhancing efficiency and customer satisfaction.
- Secure User Management: Robust authentication and authorization mechanisms for customers, administrators, and internal staff, ensuring data integrity and access control.
- Comprehensive Data Handling: Efficient management of product catalogs, customer profiles, order history, and operational data.
This project is proudly built using the MERN stack, a modern and powerful combination of technologies perfect for full-stack web development:
- MongoDB: Our flexible NoSQL database, designed for scalable and efficient data storage.
- Express.js: A minimalist yet powerful web application framework for Node.js, forming the backbone of our RESTful API.
- React.js: A declarative, component-based JavaScript library for crafting dynamic and interactive user interfaces on the frontend.
- Node.js: The JavaScript runtime environment that powers our backend, enabling scalable and high-performance server-side applications.
Other essential tools and libraries include:
- Playwright: Our chosen framework for robust end-to-end (E2E) testing across various browsers, ensuring application stability and reliability.
- Environment Management:
dotenvfor securely handling environment variables. - Authentication & Authorization:
jsonwebtokenfor token-based authentication andbcryptjsfor secure password hashing. - Data Handling:
corsfor cross-origin requests,cookie-parserfor managing HTTP cookies,multerfor handling file uploads, andnodemailerfor email functionalities.
We embrace an Agile PRINCE2 hybrid methodology for this project. This approach combines the rigorous, structured governance and well-defined project management principles of PRINCE2 with the iterative, flexible, and adaptive nature of Agile development. This balanced strategy ensures clear project direction, effective risk management, and the agility to quickly respond to evolving requirements and integrate continuous feedback.
To set up and run this project on your local machine for development, follow these steps:
Please ensure you have the following software installed on your system:
- Node.js: LTS version recommended
- npm (Node Package Manager) or Yarn: (Usually comes with Node.js installation, or install Yarn separately).
- MongoDB: Either a local MongoDB installation or access to a cloud-hosted service like MongoDB Atlas.
-
Clone the Repository: Start by getting a local copy of the project:
git clone [https://github.com/YourUsername/Brownson.git](https://github.com/YourUsername/Brownson.git) # Replace with your actual repository URL cd Brownson
-
Backend Configuration: Navigate into the
backenddirectory and install its dependencies. You'll also need to set up your environment variables.cd backend npm install # or yarn install
Create a
.envfile within thebackend/config/directory (e.g.,backend/config/config.env). Populate it with your database connection string, JWT secrets, port numbers, and any other necessary backend variables. (Tip: Check for aconfig.env.examplefile in thebackend/configfolder for guidance on required variables.) -
Frontend Configuration: Move back to the project root and then into the
frontenddirectory to install its dependencies.cd ../frontend npm install # or yarn install
Create a
.envfile (e.g.,frontend/.env.localorfrontend/.env) in thefrontenddirectory. Add any frontend-specific environment variables, such as your API base URL (REACT_APP_API_URL=http://localhost:4000).
You'll need two separate terminal windows for the backend and frontend.
-
Start the Backend Server: In your first terminal, navigate to the
backenddirectory and run:cd backend npm start # or yarn start
You should see a message indicating the backend server is running (typically on
http://localhost:4000). -
Start the Frontend Development Server: In your second terminal, navigate to the
frontenddirectory and run:cd frontend npm start # or yarn start
This will usually open the frontend application automatically in your default web browser at
http://localhost:3000.
This repository is organized into distinct, manageable parts:
backend/: Contains the robust Node.js/Express.js API that powers the application. Learn more about the Backendfrontend/: Houses the interactive React.js user interface. Explore the FrontendTesting/: Dedicated to our comprehensive Playwright end-to-end test suite. Dive into Testing Details
We welcome contributions to the Brownson project! If you'd like to get involved, please follow these general steps:
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/your-feature-name). - Make your changes, ensuring tests pass and code adheres to style guidelines.
- Commit your changes with a clear, concise message (
git commit -m 'feat: Implement new user authentication flow'). - Push your branch (
git push origin feature/your-feature-name). - Open a Pull Request describing your changes.
This project is licensed under the MIT License. See the LICENSE file in the project root for full details.