Primes as a service is a medusa store and e-commerce web application for selling prime numbers for cryptography and RSA encryption.
- Multiple types of primes offered
- Custom purchase and stripe checkout page
- Automated encrypted emails with your prime information
- 24/7 support and more!
Run npm install
in the root folder, the frontend
folder, and the admin
folder
Set up a Minio bucket, make it public and add MINIO_ENDPOINT
, MINIO_BUCKET
, MINIO_ACCESS_KEY
, and MINIO_SECRET_KEY
environment variables in the .env
file. Check .env.template
for what environment variables exist. MINIO_ENDPOINT
is already configured in the env.template
. Keep that. Refer to Medusa.js's guide on setting up MinIO for more information.
Create a Stripe account and add your stripe API key as STRIPE_API_KEY
in the .env
file in root and your public key as NEXT_PUBLIC_STRIPE_KEY
in the .env
file in the frontend
folder. This will be used for the Medusa checkout feature.
- Start MinIO:
./minio.exe server ./ --address 127.0.0.1:9001 --console-address :9090
- Start Medusa in a new command line window:
medusa develop
- Open another instance of your command line and navigate to frontend:
cd frontend
- Then to run frontend:
yarn dev
- Open yet another instance of your command line and go to admin:
cd admin
- To run the admin:
npm start
Your frontend should be running at http://localhost:8000/! Your medusa API is running at port 9000, and the admin portal is running at port 7000.
Type | Username (Email) | Password | Where |
---|---|---|---|
User | test@test.test |
test |
Frontend |
Admin | admin@medusa-test.com |
supersecret |
Admin panel |
Minio | minioadmin |
minioadmin |
Minio console |
The backend of our app (prime generation) is a FastAPI endpoint hosted on Deta.
You can test it out here: https://lpdet4.deta.dev/gentestprime
The documentation for the API endpoint is here: https://lpdet4.deta.dev/docs
Note: An API key is required for production prime generation.
To self host the FastAPI endpoint, run uvicorn main:app --reload
, and see your app running at http://127.0.0.1:8000.
An Azure VM hosts an email script to automate the prime checkout process.