Project Name: MyWines Web Application
Description: MyWines is a web application for wine enthusiasts to manage their wine collection. Users can log in, add, edit, and view details of their wines through an intuitive user interface. This application utilizes React for the frontend, Express.js for the backend, and PostgreSQL for the database.
Installation: Clone the repository:
bash Copy code git clone Navigate to the project directory:
bash Copy code cd mywines-web-app Install dependencies for the frontend:
bash Copy code cd frontend npm install Install dependencies for the backend:
bash Copy code cd ../backend npm install Set up the PostgreSQL database:
Create a new PostgreSQL database named "MyWines". Update the database configuration in the backend .env file with your PostgreSQL credentials. Start the backend server:
sql Copy code npm start Start the frontend development server:
bash Copy code cd ../frontend npm start Open your browser and navigate to http://localhost:3000 to access the application.
Features: User Authentication: Users can log in securely using their email and password. Dashboard: View a list of wines with options to add, edit, and view details. Add Wine: Add new wines to the collection, including name, type, varietal, year, and an optional image upload. Edit Wine: Modify existing wine details, including name, type, varietal, year, and image. View Wine: Access detailed information about each wine in the collection. Responsive Design: The application is designed to be responsive and accessible on various devices.
Technologies Used: Frontend: React.js, Axios, Tailwind CSS Backend: Express.js, PostgreSQL, pg (PostgreSQL client), CORS Other: Next.js (for routing), FileReader API (for file upload)
Backend API Endpoints:
POST /login: Endpoint for user authentication.
GET /dashboard: Endpoint to retrieve the list of wines.
POST /dashboard/addWine: Endpoint to add a new wine to the collection.
POST /dashboard/editWine/:id: Endpoint to fetch details of a specific wine for editing.
PUT /dashboard/editWine/:id: Endpoint to update details of a specific wine.
Contributing: Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
Fork the repository. Create your feature branch (git checkout -b feature/new-feature). Commit your changes (git commit -m 'Add new feature'). Push to the branch (git push origin feature/new-feature). Open a pull request.
License: This project is licensed under the MIT License. See the LICENSE file for details.
Author: Simelane Sibusiso