ABC Pharmacy Management System is a web-based application designed to manage invoices and product inventory for a pharmacy. It is an assesment given to me from 21c Care (https://www.21ccare.com/). This system allows users to create, view, edit, and delete invoices, as well as manage product details associated with each invoice.
- Navigate to the frontend directory.
- Install dependencies using:
npm install
. - Start the development server using :
npm start
. - Access the application at http://localhost:3000 in your web browser.
- Navigate to the backend directory.
- Install dependencies using
go mod tidy
. - Start the backend server using
go run main.go
. - The server will start running at http://localhost:8080.
- Start PostgreSQL Server:
- Access PostgreSQL Shell (psql):
psql -U username -d database_name
- Create a Database :
CREATE DATABASE your_database_name;
- change connection string in main.go
const ( host = "localhost" port = 5432 user = "your user" password = "yur password" dbname = "abc_pharmacy" )
CREATE TABLE IF NOT EXISTS products ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, quantity INT NOT NULL, unit_price DECIMAL(10, 2) NOT NULL, total DECIMAL(10, 2) NOT NULL );
CREATE TABLE IF NOT EXISTS customers ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, mobile_no VARCHAR(20) NOT NULL, email VARCHAR(255) NOT NULL, address TEXT NOT NULL, billing_type VARCHAR(50) NOT NULL );
CREATE TABLE IF NOT EXISTS invoices ( id SERIAL PRIMARY KEY, customer_name VARCHAR(255) NOT NULL, mobile_no VARCHAR(20) NOT NULL, email VARCHAR(255) NOT NULL, address TEXT NOT NULL, billing_type VARCHAR(50) NOT NULL, products JSONB NOT NULL, total_amount DECIMAL(10, 2) NOT NULL );
Usage
- Creating Invoices
- Editing Invoices
- Deleting Invoices
- Searching Invoices
Ensure that the backend server is running before accessing the frontend. Make sure to configure the database connection details in the backend configuration file (config.json or .env file). The system is designed for managing invoices and product inventory specifically for pharmacies. It may require customization to suit other types of businesses.
- Fork the repository to your GitHub account.
- Clone your forked repository to your local machine.
- Create a new branch for your changes: git checkout -b feature-name.
- Make your changes, ensuring to follow the project's coding conventions and guidelines.
- Commit your changes with descriptive commit messages: git commit -m "Add new feature".
- Push your changes to your fork: git push origin feature-name.
- Submit a pull request from your fork's branch to the main repository's main branch.