This project is a file storage application built using a modern web development stack. The project uses Shadcn UI for the frontend interface, Next.js for the frontend framework, NestJS for the backend framework, PostgreSQL as the database, and Prisma ORM for database interactions.
Project stack:
- Frontend: Next.js
- Backend: Nest.js
- Database: PostgreSQL
- ORM: Prisma ORM
- UI Kit: Shadcn UI
-
Fill in the
.env
file in theserver
directory with the following content:DATABASE_URL="postgresql://user:password@host:port/database_name?schema=public" JWT_SECRET="AnyString" JWT_SECRET_REFRESH="AnyString" CLIENT_URL="http://localhost:3000"
-
Install dependencies:
pnpm i # or npm i # or yarn i
-
Prepare the database:
npx prisma migrate dev npx prisma generate
-
Start the server:
pnpm run start:dev # or npm start dev # or yarn start dev
- Backend URL:
http://localhost:4000/api/
- Swagger Documentation:
http://localhost:4000/docs
- Backend URL:
-
Fill in the
.env
file in theclient
directory with the following content:NEXT_PUBLIC_API_URL=http://localhost:4000/ NEXT_PUBLIC_STATIC_URL=http://localhost:4000/uploads API_URL=localhost
-
Start the client:
pnpm run dev # or npm start dev # or yarn start dev
- Website URL:
http://localhost:3000
- Website URL:
- Access the backend at
http://localhost:4000/api/
. - View the Swagger documentation at
http://localhost:4000/docs
.
- The website is available at
http://localhost:3000
.
- File upload and storage
- User authentication with JWT
- API documentation with Swagger
Ensure that the environment variables are correctly set in the .env
files for both the server and client as described in the Installation section.
- API documentation is available at
http://localhost:4000/docs
.
- Ensure that PostgreSQL is running and accessible using the credentials provided in the
.env
file. - Verify that the environment variables are correctly set.
- Check the logs for any error messages and follow the instructions.
This project is licensed under the MIT License.