T-Fashionista is a full-stack e-commerce web application tailored for T-shirt enthusiasts. Leveraging a robust tech stack, this project showcases modern web development at its finest.
- Next.js – React framework
- TypeScript – Language
- NextAuth.js – Authentication library
- Prisma - ORM
- PostgreSQL – Database
- Tailwind – CSS framework
- Turborepo – Monorepo
- Vercel – Deployments
To get a local copy up and running, please follow these simple steps.
Here is what you need to be able to run T-Fashionista.
- Node.js (Version: >=18.x)
- PostgreSQL
- Yarn (recommended)
-
Clone the repo into a public GitHub repository (or fork https://github.com/KshitijTodkar48/T-Fashionista/fork).
git clone https://github.com/KshitijTodkar48/T-Fashionista.git
-
Go to the project folder
cd T-Fashionista -
Install packages with yarn
yarn install
-
Set up your
.envvariables.Create a new file named
.env, one inT-Fashionista/apps/admindirectory and another inT-Fashionista/apps/webdirectory.In both the
.envfiles, add a variable namedNEXTAUTH_SECRET.- Use
openssl rand -base64 32to generate a random string and set it as the value ofNEXTAUTH_SECRET.
Create another
.envfile inT-Fashionista/packages/databasedirectory and add a variable namedDATABASE_URLin it.- You will need you own postgresql cloud database. Put its link (eg.-
postgresql://<user>:<pass>@<db-host>:<db-port>) underDATABASE_URLin the.envfile.
- Use
-
Setup Node If your Node version does not meet the project's requirements as instructed, "nvm" (Node Version Manager) allows using Node at the version required by the project.
You first might need to install the specific version and then use it:
nvm install && nvm useYou can install nvm from here.
-
Set up the database using the Prisma schema.
cd packages/databaseAnd run the following commands:
yarn run db:generate
yarn run db:push
-
Start both the admin and web applications.
Go back to root directory (from
T-Fashionista/packages/databasetoT-Fashionista) by running:cd ../..And run the following command:
yarn dev
-
Open the applications running locally:
Web app on: http://localhost:3000
Admin app on: http://localhost:3001