myFOODIE-server is the backend API for the myFOODIE web application, which helps Hemas Hospital staff manage meal orders efficiently. This server handles:
- Order creation and management
- Food items management
- Department & employee integration
- Role-based access and authentication
- ✅ User Authentication with JWT
- ✅ CRUD operations for orders, food items, and departments
- ✅ Role-based access control for staff and management
- ✅ Transactional order creation ensuring database consistency
- ✅ Seamless integration with PostgreSQL database
- Backend: Node.js, Express.js
- Database: PostgreSQL
- ORM: Sequelize
- Authentication: JWT
- Validation: Zod / custom middleware
- Environment Management: dotenv
- Frontend: Next.js
- Node.js v20+
- PostgreSQL v15+
- npm
- create the .env file and add your
- PG_PASSWORD
- JWT_SECRET
- EMAIL_USER
- EMAIL_PASS
# Clone repository
git clone https://github.com/yourusername/myFOODIE-server.git
cd myFOODIE-server
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Update database credentials, JWT secret, etc.
# Run migrations (if using Sequelize CLI)
npx sequelize db:migrate
# Start the server
npm run dev