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
.env
variables.Create a new file named
.env
, one inT-Fashionista/apps/admin
directory and another inT-Fashionista/apps/web
directory.In both the
.env
files, add a variable namedNEXTAUTH_SECRET
.- Use
openssl rand -base64 32
to generate a random string and set it as the value ofNEXTAUTH_SECRET
.
Create another
.env
file inT-Fashionista/packages/database
directory and add a variable namedDATABASE_URL
in it.- You will need you own postgresql cloud database. Put its link (eg.-
postgresql://<user>:<pass>@<db-host>:<db-port>
) underDATABASE_URL
in the.env
file.
- 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 use
You can install nvm from here.
-
Set up the database using the Prisma schema.
cd packages/database
And 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/database
toT-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