Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
89e48ff
Version 1 with mysql and express/node js addition
Nino-Marril Sep 9, 2025
aff126f
Remove misplaced Sales folder from repository
Nino-Marril Sep 9, 2025
4fa298a
Added mysql and express/node
Nino-Marril Sep 9, 2025
1777cd8
Removed InventorySystem and related files
Nino-Marril Sep 9, 2025
d5f4432
Create SalesSystem
Nino-Marril Sep 9, 2025
0c48cc6
Delete InventorySystem/backend/InventorySystem/SalesSystem
Nino-Marril Sep 9, 2025
5c1cf23
Create temp
Nino-Marril Sep 9, 2025
66cbe98
Create db
Nino-Marril Sep 9, 2025
dae9dea
"Added backend files"
Nino-Marril Sep 9, 2025
1e2e46e
Add files via upload
Nino-Marril Sep 9, 2025
4829502
Delete InventorySystem/backend/InventorySystem/backend directory
Nino-Marril Sep 9, 2025
02841ca
Create temp
Nino-Marril Sep 9, 2025
008a7bb
Create temp2
Nino-Marril Sep 9, 2025
27b3676
Create temp3
Nino-Marril Sep 9, 2025
9122d3a
Delete InventorySystem/backend/InventorySystem/Sales/backend/temp3
Nino-Marril Sep 9, 2025
b340921
"Added backend for now"
Nino-Marril Sep 9, 2025
9c5635d
Delete InventorySystem/backend/InventorySystem/Sales/sql directory
Nino-Marril Sep 9, 2025
e49dc94
Create tempp
Nino-Marril Sep 9, 2025
26a049e
Create tempp3
Nino-Marril Sep 9, 2025
7e1b507
Add files via upload
Nino-Marril Sep 9, 2025
7892481
Delete InventorySystem/backend/InventorySystem/Sales/backend/tempp
Nino-Marril Sep 9, 2025
0d4bf2e
Delete InventorySystem/backend/InventorySystem/Sales/backend/sql dire…
Nino-Marril Sep 9, 2025
1a96604
Create description.txt
Nino-Marril Sep 9, 2025
895fd87
Create tablesdesc.txt
Nino-Marril Sep 9, 2025
52c2fea
"Added sql stuff"
Nino-Marril Sep 9, 2025
578e893
"Added backend 1st part"
Nino-Marril Sep 9, 2025
aedfe90
Create db_creation.txt
Nino-Marril Sep 9, 2025
f59bedc
"The database and a sample of data"
Nino-Marril Sep 9, 2025
b1b3f2b
moved sales directory
xxsummi Sep 9, 2025
43a85d4
Inventory backend connected to frontend
cheezka Sep 13, 2025
b2cbb1c
Added initial frontend
xxsummi Sep 13, 2025
6223c3c
Updated backend with react frontend and mariadb
Nino-Marril Sep 13, 2025
a52bb07
Merge remote changes into Inventory-Connection
Nino-Marril Sep 13, 2025
e8928d0
added whatever
xxsummi Sep 20, 2025
51d8325
WIP before merging v1_branch
xxsummi Sep 20, 2025
8bd67dd
updated gitignore
xxsummi Sep 20, 2025
4aee41c
updated gitignore
xxsummi Sep 20, 2025
27457be
Merge origin/v1_branch into dev
xxsummi Sep 20, 2025
c09b2b6
Stop tracking bin, obj, and node_modules
xxsummi Sep 20, 2025
0d319cb
Ignore bin and obj folders
xxsummi Sep 20, 2025
e405498
removed inventory-frontend folder
xxsummi Sep 20, 2025
cf7eeb1
Added sales frontend
cheezka Oct 10, 2025
083b896
Sales website
Nino-Marril Oct 15, 2025
ab30399
Add files via upload
Nino-Marril Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
.vs/

bin/
obj/
*.dll
*.exe
*.pdb

.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
68 changes: 68 additions & 0 deletions BACKEND_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Backend Setup Guide

## 1. Create .env file in backend directory

Create a file named `.env` in the `/backend` directory with the following content:

```
# Database Configuration
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=sales_system

# JWT Secret
JWT_SECRET=your_super_secret_jwt_key_here_change_this_in_production

# Server Port
PORT=3000
```

## 2. Database Setup

1. Make sure MySQL is running
2. Run the schema.sql file to create the database and tables:
```bash
mysql -u root -p < migrations/schema.sql
```

## 3. Install Dependencies

```bash
cd backend
npm install
```

## 4. Start the Backend Server

```bash
cd backend
npm start
# or
node src/server.js
```

## 5. Frontend Setup

The frontend is already configured to connect to the backend at `http://localhost:3000/api`.

## API Endpoints Available:

- `POST /api/auth/login` - Login with email and password
- `GET /api/products` - Get all products
- `GET /api/sales` - Get sales (admin only, requires auth)
- `POST /api/sales` - Create new sale (requires auth)

## Sample User Credentials:

Based on the schema, you can create a user with:
- Email: cheska@example.com
- Password: password123 (you'll need to generate the bcrypt hash)

## Frontend Integration:

The frontend now has:
- `src/services/api.js` - API service for backend communication
- `src/contexts/AuthContext.jsx` - Authentication context provider

You can now use these in your components to connect to the backend!
25 changes: 0 additions & 25 deletions InventorySystem/backend/InventorySystem/InventorySystem.sln

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.8">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading