Welcome to Nestec! Nestec is an innovative agriculture app designed to streamline farm management tasks and optimize agricultural operations. Whether you're a small-scale farmer or managing a large farm, Nestec offers tools to enhance productivity and efficiency.
Empowering farmers, one harvest at a time
https://bshongwe.github.io/Nestec_farm-app/
https://bshongwe.github.io/Nestec_farm-app-landing-page/
https://medium.com/@shongwe.bhekizwe/nestec-portfolio-project-blog-post-6361fadaa45f
https://www.linkedin.com/in/ernest-shongwe-31138b8b/
- Express: For building the RESTful API and handling HTTP requests
- Mongoose: For interacting with MongoDB database
- dotenv: For loading environment variables from the
.env
file - bcrypt: For hashing passwords
- jsonwebtoken: For generating and verifying JSON Web Tokens for authentication
- Redis-CLI: for the cache database server
- Node.js: Server
- twilio: Python library for Twilio API
- Roboflow YOLO v8
- OpenWeather API
- Other API (not mentioned due to permission grant Ts & Cs)
- react-router-dom: For client-side routing
- axios: For making HTTP requests to the backend API
- Bootstrap: For styling and UI components
- Node.js: API
-
Navigate to the
backend
directory:mkdir backend && cd backend
-
Initialize npm (if not already initialized):
npm init -y
-
Install required dependencies:
npm install express mongoose dotenv bcrypt jsonwebtoken
-
Navigate to the
<repo root>
directory:cd ../<repo root>
-
Initialize npm:
npm init -y
-
Install required dependencies:
npm install axios
To install and run Nestec on your local machine, follow these steps:
-
Clone this repository to your local machine.
git clone /~https://github.com/bshongwe/Nestec_farm-app.git
-
Navigate to the project directory.
cd Nestec_farm-app
-
Install dependencies for the frontend and backend.
cd /<repo root> npm install cd ../node-redis-mongodb-backend npm install
-
Ensure you have MongoDB and Redis installed and running on your machine. Make sure to note down the MongoDB and Redis ports.
-
Create a
.env
file in thecache-aside pattern server
directory and provide the necessary environment variables.MONGODB_URI=mongodb://localhost:<mongo_port>/nestec REDIS_URI=redis://localhost:<redis_port> PORT=<node_port>
Replace
<mongo_port>
,<redis_port>
, and<node_port>
with the respective ports for MongoDB, Redis and Node server. -
To start the servers
cd ../<repo root>
npm start
or
node server.js
N. B.: the front end static files are automatically served into the backend server when the Node server runs. Check the API routes. Adjust with caution.
cd ../node-redis-mongodb-backend
npm start
- Access the application in browser using the following
ports at:
- frontend:
http://localhost:3000
- backendend (to run the backend servers:
- MongoDB:
http://localhost:3030
- Redis:
http://localhost:11136
- MongoDB:
Make sure to replace `<mongo_port>`, `<redis_port>`, and
`<node_port>` with the actual ports you're using for
MongoDB, Redis, and your Node server respectively.
- App will continue being developed to add more features
- Project Reviewer(s) recommendations:
- User auth should also cover all the other contents beyond the home page and be render inaccessible until auth is completed
- Recommendations by:
- Seth Ketsi (Cohort 16)
- Robert Adede (Cohort 17)
- Challenges:
- production for deployment (
run build
requires attention) - database migration: Firebase to MongoDB & Redis
- React Material routing on a mounted React framework
- Node.js static file feed
- production for deployment (
(MongoDB Data test)