OpenStore, a modern open-source store front app
- Clone the repository
- Install the frontend
- Go to the frontend directory
- Run
npm install
- Install the backend
- Go to the backend directory
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
(Linux) orvenv\Scripts\activate
(Windows) - Run
pip install -r requirements.txt
- Create the database
- Install PostgreSQL
- Create a database and name it something you like
- Have a user with full access to the database and a password
- Configure the backend
- Create a
.env
file in the backend directory with the following content:
STORE_ID = 0
HOST = "localhost"
DATABASE = "database_name"
USER = "database_user"
PASS = "database_password"
SECRET = "some long secret key"
ALGORITHM = "HS256"
- Replace the values with your own
- Create the tables
- Go to the backend directory
- Make sure the virtual environment is activated
- Run
python init.py
- Configure the frontend
- Go to the frontend directory
- Create a
.env
file with the following content:
VITE_SERVER_URL=http://localhost:8000
VITE_STORE_ID=0
- Leave these values exactly the same
- Run the frontend
- Go to the frontend directory
- Run
npm run dev
- Run the backend
- Go to the backend directory
- Make sure the virtual environment is activated
- Run
uvicorn main:app --reload
- Go to
http://localhost:5173
in your browser - Login with the default credentials:
- Username:
george
- Password:
verystrongpassword
This project is licensed under the MIT License. See the LICENSE file for more details.