React with Typescript.
Nextjs used for SSR and SSG.
Tailwind CSS.
P5.js used for t-shirt customization tool.
You will need the following environment variables in a .env.local file within the nextjs-print-on-demand directory.
NEXT_PUBLIC_BACKEND_PREFIX=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
Django with Django Rest Framework for APIs.
Postgresql database (any SQL database can be used).
Can deploy the front-end on Vercel to make use of their in-build features for Next JS projects.
To easily deploy the back-end on a DigitalOcean VPS, fill in the fields in the .env file and use Docker.
To deploy using Docker, navigate to the directory containing the Dockerfile then use the following commands:
docker build -t django-printondemand:v0 .
docker run --env-file .env django-printondemand:v0 sh -c "python manage.py makemigrations && python manage.py migrate"
docker run --env-file .env django-printondemand:v0 sh -c "python manage.py collectstatic --noinput"
docker run -d --env-file .env -p 80:8000 django-printondemand:v0