-
Clone the Repository:
git clone https://github.com/Namrah-99/movies-nestjs-nextjs-test-app.git cd movies-nestjs-nextjs-test-app
-
Install Dependencies for Both Server and Client:
# For server-side dependencies cd servers npm install # For client-side dependencies cd ../clients/user-ui npm install
-
Set Up Environment Variables:
- Copy the .env.example file to .env in both clients/user-ui and servers directories, and populate the required variables.
-
Build the Project:
# Navigate to the root of the project cd ../.. Remove-Item -Recurse -Force .\dist\ npm run build
-
Generate Prisma Client and Push Schema to Database:
cd servers npx prisma generate npx prisma db push
-
Seed the Database:
npm run seed:clear npm run seed
-
Run Prisma Studio (Optional):
npx prisma studio # Open http://localhost:5555/ in your browser to interact with the database
-
Start Microservices:
cd servers # Start the users microservice npm run start:dev users # Open a new terminal and navigate to the servers directory cd servers # Start the admin microservice npm run start:dev admin # Open another new terminal and navigate to the servers directory cd servers # Start the gateway microservice npm run start:dev gateway
-
Start the Next.js Client Application:
cd ../clients/user-ui npm run dev
- Ensure that all required environment variables are set correctly in the .env files.
- The microservices (users, admin, gateway) should be running simultaneously in different terminal windows.
- Access the Next.js application at
http://localhost:3000
.