A clean, modern digital bookstore platform. Browse, purchase via Stripe, and access your personal library.
Live MVP • Fully functional purchase flow • Secure digital delivery
- Beautiful public site — Home, About the Author, Gallery, Contact
- Full bookstore — Search, genre filtering, detailed book pages
- Smart cart — Session-based shopping cart (no login required to browse)
- Stripe payments — Secure checkout with webhooks for reliability
- Personal Library — Buyers instantly access purchased books (read online + download)
- Author dashboard ready — Rich admin panel for books, orders, gallery & messages
flowchart TB
subgraph Public
A[Home / About / Gallery / Contact]
end
subgraph Store
B[Book Catalog + Search]
C[Cart Session]
D[Stripe Checkout]
end
subgraph Users
E[Auth + Profile]
F[My Library]
end
subgraph Backend
G[(SQLite / PostgreSQL)]
H[Order + Library Services]
I[Stripe Webhooks]
end
A --> B
B --> C
C --> D
D --> H
H --> G
D --> I
I --> F
E --> F
sequenceDiagram
participant User
participant Store as Bookstore
participant Stripe
participant Webhook
User->>Store: Browse & add books to cart
User->>Store: Checkout (login required)
Store->>Stripe: Create Checkout Session
Stripe-->>User: Redirect to Stripe payment page
User->>Stripe: Complete payment
Stripe->>Store: Redirect to /success
Store->>Store: Mark order paid + add to Library
Note over Store,Webhook: Webhook (backup)
Stripe-->>Webhook: checkout.session.completed
Webhook->>Store: Confirm payment + grant access
User->>Store: Open My Library → Read / Download
erDiagram
User ||--o{ Order : places
User ||--o{ UserLibrary : owns
Order ||--o{ OrderItem : contains
OrderItem }o--|| Book : references
UserLibrary }o--|| Book : grants_access
Book {
string title
string subtitle
text description
decimal price
string genre
file cover_image
file file
boolean is_free
boolean is_featured
int views
int downloads
}
Order {
decimal total
string payment_status
string stripe_checkout_session
}
UserLibrary {
datetime purchased_at
}
- Python 3.10+
- Stripe account (free test mode works)
git clone https://github.com/cleven12/biikstore.git
cd biikstore
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtcp .env.example .envEdit .env and add your Stripe keys:
STRIPE_PUBLIC_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...python manage.py migrate
python manage.py createsuperuser # optional but recommended
python manage.py runserverVisit:
- Storefront: http://127.0.0.1:8000/
- Admin: http://127.0.0.1:8000/admin/
- Go to Stripe Dashboard (use Test mode)
- Copy Publishable key and Secret key
- For local webhooks:
stripe login
stripe listen --forward-to localhost:8000/store/webhook/Copy the whsec_... value into your .env.
The app converts prices from TZS to USD cents internally for Stripe compatibility.
biikstore/
├── config/ # Django project settings & URLs
├── home/ # Public pages + Author profile + Gallery + Contact
├── store/ # Books, Cart, Orders, Stripe integration
├── users/ # Accounts, Profile, Library
├── templates/ # All Django templates
├── media/ # Uploaded images & book files (gitignored in prod)
├── static/ # Custom CSS / assets
├── manage.py
├── requirements.txt
└── .env.example
| Layer | Technology |
|---|---|
| Backend | Django 5 |
| Database | SQLite (dev) / PostgreSQL |
| Payments | Stripe Checkout + Webhooks |
| Images | Pillow |
| Config | python-decouple |
| Frontend | Bootstrap 5 + custom styles |
Comming soon
| Homepage | Bookstore |
|---|---|
![]() |
![]() |
| Library | Checkout |
|---|---|
![]() |
![]() |
python manage.py makemigrations
python manage.py migrate
python manage.py test- Set
DEBUG=False - Use PostgreSQL + proper static/media serving (WhiteNoise / S3)
- Rotate and secure
SECRET_KEY - Configure real Stripe live keys + domain
- Set up proper
ALLOWED_HOSTSandCSRF_TRUSTED_ORIGINS
# Stop committing development databases
git rm --cached bookstore_db.db db.sqlite3
echo "bookstore_db.db\ndb.sqlite3" >> .gitignore
git add .gitignore
git commit -m "chore: stop tracking dev databases"MIT — see LICENSE file.
Built by Cleven.
Made with ❤️ + clean code.



