Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Shop 🔒

A console-based e-commerce management system written in C++ with a focus on security fundamentals: Role-Based Access Control (RBAC), a custom cipher for credentials at rest, Two-Factor Authentication, and audit logging.

Language: C++ License: MIT

Features

Security architecture

  • Credentials at rest — a shift-based cipher obfuscates usernames and passwords in the text-file database.
  • Two-Factor Authentication — admin login requires an OTP from a simulated token system.
  • Activity logging — sensitive actions (logins, product deletion, role changes) are appended to ActivityLogs.txt for non-repudiation.
  • Input sanitation — custom validation to prevent buffer issues and type-mismatch errors during data entry.

Roles

  • Admin — user management, 2FA toggle, audit logs, sales analysis.
  • Employee — inventory management, restock alerts, support tickets.
  • Customer — browse products, cart, wishlist, checkout.

Tech stack

  • Language: C++ (standard library only)
  • Storage: flat text files, written at runtime
  • Interface: colour-coded console menus

Project structure

File Role
main.cpp entry point and authentication
admin.h / employee.h / customer.h role-specific logic
basicfunctionalities.h string utilities and security checks

The *.txt files (product catalogue, carts, logs, OTPs, credentials) are the runtime database — they are generated by the program on first run and are git-ignored, so a clean checkout starts empty.

Build & run

git clone https://github.com/saimcyber/Secure-Shop-cpp.git
cd Secure-Shop-cpp
g++ main.cpp -o secureshop
./secureshop

Note

This is a learning project. The cipher is a teaching device, not real cryptography — do not store real credentials in it.

License

MIT — see LICENSE.

About

A security-focused C++ shop management system implementing authentication, RBAC, encryption concepts, 2FA, and audit logging.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages