Skip to content
Open

nc #59

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
06718af
Merge pull request #30 from creativetimofficial/dev-main
sajadevo Nov 2, 2022
0dd4e23
add nepcha script
sajadevo Mar 29, 2023
1ffc362
Merge pull request #31 from creativetimofficial/feature/v2.0.1
sajadevo Mar 29, 2023
10ee108
Update README.md
sajadevo Apr 25, 2023
853d6e4
Update index.html
sajadevo Apr 25, 2023
98f1901
upgrade to Material Tailwind v2
maisamaf Oct 25, 2023
f970ed2
fix: implement upgrade changes
maisamaf Oct 25, 2023
de9dd0a
ref: update colors
maisamaf Nov 5, 2023
8aed183
fix the issues
sajadevo Nov 5, 2023
f7ed994
fix design issues
maisamaf Nov 7, 2023
9f3d204
ref: add border to components
maisamaf Nov 7, 2023
4966206
ref: signin & signup pages
maisamaf Nov 13, 2023
9b01397
update the design
sajadevo Nov 14, 2023
c1906d9
ready for release
sajadevo Nov 14, 2023
830849c
update change log
sajadevo Nov 14, 2023
1159bbd
Merge pull request #36 from maisamaf/feature/v3
sajadevo Nov 14, 2023
cfd2032
Deploy on Genezio
cristim67 Jul 15, 2024
8a04a72
Merge pull request #46 from cristim67/main
marqbeniamin Jul 15, 2024
618354d
nc
antongenis Jun 11, 2025
a95cdbb
nc
antongenis Jun 11, 2025
3a20405
paid plans
antongenis Jun 11, 2025
d9f2036
simulation
antongenis Jun 12, 2025
062f3f6
smiles string
antongenis Jun 12, 2025
f5ae84e
added files
antongenis Jun 12, 2025
d369a7c
base 3d sim
kobimic887 Jun 13, 2025
3f1d899
change
kobimic887 Jun 13, 2025
a8f23f7
index.js
kobimic887 Jun 13, 2025
c44e51d
index
kobimic887 Jun 13, 2025
5aad8e5
add
kobimic887 Jun 13, 2025
7bf440b
look better
kobimic887 Jun 13, 2025
9555d9f
make kt work
kobimic887 Jun 13, 2025
46c48e5
work?
kobimic887 Jun 13, 2025
afb46c3
delte not working file
kobimic887 Jun 13, 2025
e904c1c
final fix
kobimic887 Jun 13, 2025
0f475e4
readd files
antongenis Jun 13, 2025
da8c2eb
readd files
antongenis Jun 13, 2025
0840bcb
readd files
antongenis Jun 13, 2025
5717228
readd files
antongenis Jun 13, 2025
dd69a4f
https
antongenis Jun 14, 2025
80f7b3b
https
antongenis Jun 14, 2025
59ff9e0
change hostname
antongenis Jun 14, 2025
a60aad8
change hostname
antongenis Jun 14, 2025
c493052
change hostname
antongenis Jun 14, 2025
058b32a
change hostname
antongenis Jun 14, 2025
80e8c3c
change hostname
antongenis Jun 14, 2025
66cfcff
fix style
antongenis Jun 14, 2025
70291d1
nc
antongenis Jun 14, 2025
4624083
fix
antongenis Jun 16, 2025
f9a4587
fix https
Jun 16, 2025
f7e732c
http works
Jun 17, 2025
80663b4
Add 2D molecule viewer with SMILES input and fallback SVG viewer
lego2011 Jun 18, 2025
43a61ef
Enhance 2D molecular viewer with chemistry-aware visualization
lego2011 Jun 18, 2025
8a22cd6
doesnt work fully
lego2011 Jun 19, 2025
2170316
working payment sys
lego2011 Jun 24, 2025
fe336c7
ketcher
Jun 20, 2025
3af0653
ketcher works great
Jun 20, 2025
9f2ee72
ketcher
Jun 20, 2025
866386b
added in iframe
antongenis Jun 23, 2025
9edbe8e
Security: Remove hardcoded Stripe keys and add proper environment con…
lego2011 Jun 24, 2025
e6bf35c
Add clean Stripe server without hardcoded secrets
lego2011 Jun 24, 2025
0423567
Complete development environment setup
lego2011 Jun 24, 2025
123add2
docs: Update README with new features and setup instructions
lego2011 Jun 24, 2025
fc528f1
Update .env.example
kobimic887 Jun 24, 2025
9fec702
fix annual month
lego2011 Jun 24, 2025
124bb18
mol*
lego2011 Jun 27, 2025
94b5de6
iframe molstar
lego2011 Jun 27, 2025
95dfca4
api test
lego2011 Jun 30, 2025
085e3a9
cors
lego2011 Jun 30, 2025
2f588f2
:3000 no more
lego2011 Jun 30, 2025
28cadb9
vite 0000
Jul 3, 2025
db82510
added files
Jul 3, 2025
f3aa339
/api/hello
Jul 3, 2025
f9d1085
api
Jul 3, 2025
c879d33
remove cryptotrandom
Jul 3, 2025
9ba593d
remove cryptotrandom
Jul 3, 2025
0ff5ae1
code
Jul 3, 2025
df39551
molecule
Jul 3, 2025
9436e9c
hostname
Jul 3, 2025
608fdcf
move to https
Jul 4, 2025
f5ce240
3001
Jul 4, 2025
29bb315
added
Jul 4, 2025
6fc4bb2
3001
Jul 4, 2025
712abdb
stripe https
Jul 4, 2025
7790b5d
remove stripe servers
Jul 5, 2025
be8886c
simple
Jul 5, 2025
54f2b62
simple
Jul 5, 2025
c1f1863
simple
Jul 5, 2025
b751586
add signup
Jul 5, 2025
f02e993
with tokens
Jul 5, 2025
1225217
redirect stripe
Jul 6, 2025
7613b58
redirect stripe
Jul 6, 2025
3c8e450
with homepage
Jul 6, 2025
29783fe
new files
Jul 6, 2025
11a4a4e
fe pages
Jul 6, 2025
7ebd6a4
add images
Jul 6, 2025
84f2dcb
test
Jul 8, 2025
0799bfb
param rename
Jul 8, 2025
6436dae
styles
Jul 9, 2025
2464b4d
added
Jul 9, 2025
5b598cd
added
Jul 9, 2025
f2f4eb8
button link
Jul 9, 2025
196b1e7
sanitized
Jul 9, 2025
2e88d30
sanitize style
Jul 9, 2025
11c294c
redesign
Jul 10, 2025
701886f
redesign
Jul 10, 2025
cce3ca6
restyled
Jul 10, 2025
886baef
contact us has email
lego2011 Jul 11, 2025
385568b
temp
Jul 11, 2025
8813c61
resolved
Jul 11, 2025
343721b
emails added
Jul 11, 2025
652fce1
with text
Jul 11, 2025
b8b854c
text skimming
Jul 12, 2025
4eecfee
text skimming
Jul 12, 2025
9696753
text skimming
Jul 12, 2025
aaa800b
added component redirect
Jul 15, 2025
350ee53
with a table
Jul 16, 2025
f39d752
resize
Jul 17, 2025
5acb436
with smiles
Jul 17, 2025
5445e4c
notifications
Jul 18, 2025
8f35a11
with ui fixes
Jul 18, 2025
a6d0873
re
Jul 18, 2025
4b060c8
signup
Jul 18, 2025
421bbbf
mobile view
Jul 18, 2025
a026691
working good blog
lego2011 Jul 18, 2025
7475847
ds
Jul 19, 2025
2418b73
message
Jul 19, 2025
fa02a3e
stable with cart
Jul 19, 2025
1e0261c
redrawing process
Jul 19, 2025
3838336
adding tokens refinment
Jul 20, 2025
eadb974
full redesign
Jul 22, 2025
66c8b95
full redesign
Jul 22, 2025
10dbe85
refine shopping cart
Jul 22, 2025
a8eeb01
moved the navbar on topp
Jul 23, 2025
b2a082c
stylings
Jul 23, 2025
98ed9f0
stylings
Jul 23, 2025
f6838e0
stylings
Jul 23, 2025
2584e9c
stylings
Jul 23, 2025
5537bb9
redesigns
Jul 24, 2025
a5320d8
redesigns
Jul 24, 2025
f144017
redesigns
Jul 24, 2025
449b66c
preview
lego2011 Jul 24, 2025
cb10dc4
Merge pull request #1 from eitangenis/kobibranch2
eitangenis Jul 24, 2025
14ce7da
title change
Aug 6, 2025
2dcb11c
headers
Aug 9, 2025
0d8a53b
fix vite error
Aug 13, 2025
a023966
fix vite error
Aug 13, 2025
db9761f
with control panel
Aug 30, 2025
70f1a5d
set t
Aug 31, 2025
5fa97bc
set t
Aug 31, 2025
1374c1a
set t
Aug 31, 2025
94291fc
fix
Aug 31, 2025
91e08d8
fix
Sep 1, 2025
91b1f29
fix
Sep 1, 2025
a067d5c
show cart
Sep 3, 2025
04989f3
show cart
Sep 3, 2025
74df26d
show cart
Sep 3, 2025
e4da445
show cart
Sep 3, 2025
ca6ecce
cart fix
Sep 4, 2025
d4aac00
cart fix
Sep 6, 2025
ea21a2b
added checkbox on molecules
Sep 6, 2025
29802d5
nc
Sep 6, 2025
d056a37
nc
Sep 6, 2025
244946b
refine view
Sep 10, 2025
acfc232
add admet
Sep 13, 2025
e23ba81
add admet
Sep 13, 2025
2c5543b
texts
Sep 13, 2025
a34b8b8
texts
Sep 19, 2025
15866b6
fix cart
Sep 19, 2025
f57a56a
Update simulation page layout: resize Ketcher editor and reorganize c…
Sep 19, 2025
4680b99
Merge branch 'main' into updatedbuttons
Sep 20, 2025
9907746
new version
Sep 20, 2025
e600e2d
add post
antong-creator Oct 3, 2025
62d39d5
add post
antong-creator Oct 4, 2025
6119f8d
change stripe key
antong-creator Oct 5, 2025
ccc437a
test again
antong-creator Oct 6, 2025
4bab81a
test again
antong-creator Oct 6, 2025
1e2d4bd
test again
antong-creator Oct 6, 2025
671f624
native added
antong-creator Oct 11, 2025
f19d73b
native added
antong-creator Oct 11, 2025
7c67f95
redirect to home
antong-creator Oct 28, 2025
7d02899
new search
antong-creator Oct 29, 2025
a835f23
added similarity
antong-creator Oct 31, 2025
f2b5504
added similarity
antong-creator Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
.git
Dockerfile
.dockerignore
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Stripe Configuration
# Get these from your Stripe Dashboard (https://dashboard.stripe.com/apikeys)

# Stripe Publishable Key (starts with pk_test_ or pk_live_)
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key_here

# Stripe Secret Key (starts with sk_test_ or sk_live_)
# WARNING: Keep this secret! Never commit this to version control
STRIPE_SECRET_KEY=sk_test_your_secret_key_here
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ dist
dist-ssr
*.local

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [2.1.0] 2023-11-14
- Upgrade to Material Tailwind `v2`

## [2.0.1] 2023-03-29

- Add nepcha scripts

## [2.0.0] 2022-11-02

- Update the entire structure
Expand Down
31 changes: 31 additions & 0 deletions CLOUDFLARE_DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Cloudflare Pages Deployment Guide

## API Proxy Function

This project includes a Cloudflare Pages function to handle API calls and bypass CORS restrictions when deployed.

### Files Added:

1. **`functions/api-proxy.js`** - Cloudflare Pages function that proxies calls to `api.chemtest.tech:3000`
2. **`public/_headers`** - CORS headers configuration for Cloudflare Pages
3. **`wrangler.toml`** - Cloudflare Pages configuration

### How It Works:

- **Development**: Uses `http://localhost:3002/api-proxy` (Node.js server)
- **Production**: Uses `/api-proxy` (Cloudflare Pages function)

The React component automatically detects the environment and uses the appropriate endpoint.

### Deployment:

1. Connect your repository to Cloudflare Pages
2. Set build command: `npm run build`
3. Set build output directory: `dist`
4. Deploy

The Cloudflare Pages function will automatically handle CORS and proxy API calls to the external service.

### Testing:

After deployment, the API Test tab will automatically work without CORS issues, fetching data from `api.chemtest.tech:3000` through the Cloudflare Pages function proxy.
96 changes: 96 additions & 0 deletions DEVELOPMENT_SETUP_COMPLETE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Development Environment Setup - Complete ✅

## 🎉 SUCCESS! Your development environment is now fully configured and running.

### What's Working:
- ✅ **Vite Development Server**: Running on http://localhost:5173
- ✅ **Stripe Payment Server**: Running on port 3001
- ✅ **Environment Variables**: Properly loaded from `.env` file
- ✅ **Secure Configuration**: No secrets in the repository
- ✅ **Unified Development**: Single `npm run dev` command starts everything

### How to Use:

#### Start Development:
```bash
npm run dev
```
This command will:
- Start the Vite development server (frontend)
- Start the Stripe payment server (backend)
- Load all environment variables from `.env`

#### Access the Application:
- **Frontend**: http://localhost:5173
- **Paid Plans Page**: http://localhost:5173/dashboard/paid-plans
- **Molecule Viewer**: http://localhost:5173/dashboard/molecule-viewer

#### Payment Testing:
- Use Stripe test card: `4242 4242 4242 4242`
- Any future expiry date and CVC will work
- Payments will be processed through Stripe's test environment

### Project Structure:
```
├── src/pages/dashboard/
│ ├── paidplans.jsx # Pricing page with Stripe integration
│ └── moleculeviewer.jsx # 2D molecule drawing tool
├── stripe-server.cjs # Express server for Stripe payments
├── .env # Environment variables (not in git)
├── .env.example # Template for environment variables
├── package.json # Scripts and dependencies
└── STRIPE_SETUP.md # Setup instructions
```

### Key Features Implemented:

#### 1. Professional Paid Plans Page
- Modern pricing design inspired by pyxis-discovery.com
- Monthly/yearly billing toggle
- "Most Popular" plan highlighting
- Feature comparison lists
- Responsive design with Material Tailwind

#### 2. Stripe Payment Integration
- Secure server-side payment processing
- Pre-built Stripe Checkout forms
- Test mode configuration
- Payment success/failure handling
- Environment-based configuration

#### 3. 2D Molecule Viewer & Drawing Tool
- Professional chemical drawing interface
- Accurate molecular geometry
- CPK color scheme for atoms
- Multiple bond types (single, double, triple)
- Interactive drawing and editing
- Export functionality

#### 4. Security Best Practices
- Environment variables for all secrets
- `.env` file excluded from git
- No hardcoded API keys
- Secure server-side payment processing

### Environment Variables:
Your `.env` file contains:
```
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
```

### Next Steps:
1. Navigate to http://localhost:5173 to see your application
2. Visit the Paid Plans page to test Stripe integration
3. Try the Molecule Viewer for chemical drawing
4. Customize the pricing plans as needed
5. Test payment flows with Stripe test cards

### For Production:
1. Replace test Stripe keys with live keys
2. Update webhook endpoints
3. Configure production environment variables
4. Deploy both frontend and backend

## 🚀 Ready to Code!
Your development environment is fully set up and ready for further development. Both the molecule viewer and payment system are working perfectly!
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:18-alpine

WORKDIR /app

COPY package.json package-lock.json* ./
RUN npm install

COPY . .

# Copy .env file
COPY .env .env

# Build static assets
RUN npm run build

EXPOSE 80

CMD ["node", "server.mjs"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Creative Tim
Copyright (c) 2023 Creative Tim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 66 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# [Material Tailwind Dashboard React](http://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?url=https://www.creative-tim.com/product/material-tailwind-dashboard-react&text=Check%20Material%20Tailwind%20Dashboard%20React%20made%20by%20@CreativeTim%20#webdesign%20#kit%20#materialdesign%20#react%20#materialtailwind%20#tailwindcss%20https://www.creative-tim.com/product/material-tailwind-dashboard-react)

![version](https://img.shields.io/badge/version-2.0.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aissue+is%3Aclosed)
![version](https://img.shields.io/badge/version-2.1.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aissue+is%3Aclosed)

![Image](https://s3.amazonaws.com/creativetim_bucket/products/488/original/material-tailwind-react-dashboard.jpg)
## 🚀 New Features Added

This fork includes additional professional features:

### 🧪 **2D Molecule Viewer & Drawing Tool**
- Professional chemical drawing interface with accurate molecular geometry
- CPK color scheme for atoms and proper bond visualization
- Interactive molecule editing and drawing capabilities
- Export functionality for molecular structures

### 💳 **Stripe Payment Integration**
- Modern pricing page design inspired by pyxis-discover.com
- Secure Stripe payment processing with pre-built checkout forms
- Monthly/yearly billing toggle with "Most Popular" plan highlighting
- Complete payment flow with success/failure handling

### 🔧 **Development Features**
- Unified development workflow with single `npm run dev` command
- Secure environment variable configuration
- No secrets in repository - all sensitive data in `.env` file
- Ready for production deployment

![Image](https://s3.amazonaws.com/creativetim_bucket/products/488/original/material-tailwind-dashboard-react.jpg)

Material Tailwind Dashboard React is our newest free Material Tailwind Admin Template based on Tailwind CSS and React. If you’re a developer looking to create an admin dashboard that is developer-friendly, rich with features, and highly customisable, here is your match. Our innovative Material Tailwind, Tailwind CSS & React dashboard comes with a beautiful design inspired by Google's Material Design and it will help you create stunning websites & web apps to delight your clients.

Expand Down Expand Up @@ -38,6 +60,7 @@ During the development of this dashboard, we have used many existing resources f
- [Material Tailwind](https://material-tailwind.com/) - Material Tailwind is an easy to use components library for Tailwind CSS and Material Design.
- [Hero Icons](https://heroicons.com/) - Beautiful hand-crafted SVG icons.
- [Apex Charts](https://apexcharts.com/) - Modern & Interactive open-source Charts.
- [Nepcha Analytics](https://nepcha.com?ref=readme) for the analytics tool. Nepcha is already integrated with Material Tailwind Dashboard React. You can use it to gain insights into your sources of traffic.

Let us know your thoughts below. And good luck with development!

Expand All @@ -46,6 +69,7 @@ Let us know your thoughts below. And good luck with development!
- [Versions](#versions)
- [Demo](#demo)
- [Quick Start](#quick-start)
- [Deploy](#deploy)
- [Documentation](#documentation)
- [File Structure](#file-structure)
- [Browser Support](#browser-support)
Expand All @@ -62,7 +86,7 @@ Let us know your thoughts below. And good luck with development!
| React |
| ----- |

| [![Material Tailwind Dashboard React](https://s3.amazonaws.com/creativetim_bucket/products/488/thumb/material-tailwind-react-dashboard.jpg)](http://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr)
| [![Material Tailwind Dashboard React](https://s3.amazonaws.com/creativetim_bucket/products/488/thumb/material-tailwind-dashboard-react.jpg)](http://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr)

## Demo

Expand All @@ -79,13 +103,49 @@ Let us know your thoughts below. And good luck with development!

Quick start options:

- Downdload from [Creative Tim](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr).
- Download from [Creative Tim](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr).

## Deploy

:rocket: You can deploy your own version of the template to Genezio with one click:

[![Deploy to Genezio](https://raw.githubusercontent.com/Genez-io/graphics/main/svg/deploy-button.svg)](https://app.genez.io/start/deploy?repository=https://github.com/creativetimofficial/material-tailwind-dashboard-react&utm_source=github&utm_medium=referral&utm_campaign=github-creativetim&utm_term=deploy-project&utm_content=button-head)

## Terminal Commands

1. Download and Install NodeJs LTS version from [NodeJs Official Page](https://nodejs.org/en/download/).
2. Navigate to the root ./ directory of the product and run `npm install` or `yarn install` or `pnpm install` to install our local dependencies.

## 🔧 Additional Setup for New Features

### Environment Configuration
1. Copy the environment template:
```bash
cp .env.example .env
```

2. Add your Stripe API keys to `.env`:
```
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
STRIPE_SECRET_KEY=sk_test_your_secret_key_here
```

### Development Commands
- **Start everything**: `npm run dev` (starts both frontend and Stripe server)
- **Frontend only**: `npm run build` then `npm run preview`
- **Stripe server only**: `npm run stripe-server`

### Testing Payments
- Use Stripe test card: `4242 4242 4242 4242`
- Any future expiry date and CVC will work
- Visit `/dashboard/paid-plans` to test the payment flow

### New Pages Available
- **Molecule Viewer**: `/dashboard/molecule-viewer` - Professional 2D chemical drawing tool
- **Paid Plans**: `/dashboard/paid-plans` - Stripe-integrated pricing page

For complete setup instructions, see `DEVELOPMENT_SETUP_COMPLETE.md`.

## Documentation

The documentation for the Material Tailwind Dashboard React is hosted at our [website](https://material-tailwind.com/?ref=readme-mtdr).
Expand Down Expand Up @@ -137,6 +197,7 @@ At present, we officially aim to support the last two versions of the following
- [License Agreement](https://www.creative-tim.com/license?ref=readme-mtdr)
- [Support](https://www.creative-tim.com/contact-us?ref=readme-mtdr)
- Issues: [Github Issues Page](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues)
- [Nepcha Analytics](https://nepcha.com?ref=readme) - Analytics tool for your website

## Reporting Issues

Expand All @@ -152,7 +213,7 @@ If you have questions or need help integrating the product please [contact us](h

## Licensing

- Copyright 2022 [Creative Tim](https://www.creative-tim.com?ref=readme-mtdr)
- Copyright 2023 [Creative Tim](https://www.creative-tim.com?ref=readme-mtdr)
- Creative Tim [license](https://www.creative-tim.com/license?ref=readme-mtdr)

## Useful Links
Expand Down
58 changes: 58 additions & 0 deletions STRIPE_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Stripe Integration Setup

This project includes Stripe payment integration for subscription plans.

## Environment Setup

1. **Copy the environment template:**
```bash
cp .env.example .env
```

2. **Get your Stripe API keys:**
- Go to [Stripe Dashboard](https://dashboard.stripe.com/apikeys)
- Copy your **Publishable key** (starts with `pk_test_` or `pk_live_`)
- Copy your **Secret key** (starts with `sk_test_` or `sk_live_`)

3. **Update your .env file:**
```env
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_actual_publishable_key_here
STRIPE_SECRET_KEY=sk_test_your_actual_secret_key_here
```

## Running the Application

1. **Start the Stripe server:**
```bash
npm run stripe-server
```

2. **Start the React development server (in another terminal):**
```bash
npm run dev
```

3. **Navigate to the pricing page:**
Open `http://localhost:5173/dashboard/paidplans`

## Security Notes

- ⚠️ **Never commit `.env` files to version control**
- ✅ The `.env` file is already added to `.gitignore`
- ✅ Use test keys (`pk_test_` and `sk_test_`) for development
- ✅ Use live keys (`pk_live_` and `sk_live_`) only in production

## Payment Flow

1. User selects a plan on the pricing page
2. Client sends request to `/create-checkout-session` endpoint
3. Server creates Stripe checkout session
4. User is redirected to Stripe's secure checkout page
5. After payment, user is redirected back with success/cancel status

## Testing

Use Stripe's test card numbers:
- **Success:** `4242 4242 4242 4242`
- **Decline:** `4000 0000 0000 0002`
- Use any future expiry date and any 3-digit CVC
Loading