An open API service indexing awesome lists of open source software.

https://github.com/tuke307/library-management

Web Project for digitalize a Library
https://github.com/tuke307/library-management

next-auth next-js

Last synced: 10 months ago
JSON representation

Web Project for digitalize a Library

Awesome Lists containing this project

README

          

# Software Engineering - Library Project

## Technologies Used

| Frontend | Backend | Database | Hosting |
|----------|--------------|----------|---------|
| - [NextUI v2](https://nextui.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Tailwind Variants](https://tailwind-variants.org)
- [Framer Motion](https://www.framer.com/motion/)
- [next-themes](https://github.com/pacocoursey/next-themes)
| - [Next.js 13](https://nextjs.org/docs/getting-started)
- [TypeScript](https://www.typescriptlang.org/) | - [Prisma](https://www.prisma.io/)
- [Postgres](https://www.postgresql.org/) | - [Vercel](https://vercel.com/)
- [Docker](https://www.docker.com/)
- [GitHub](https://github.com/) |

## Development

1. [install dependencies](#install-dependencies)
2. [choose environment](#environment)
3. [runnning tests](#running-tests)

### install dependencies
```bash
npm install
npm install -g dotenv-cli
npm install -g prisma
```

### environment
* copy and rename `.env.sample` to `.env.development`
* copy and rename `.env.sample` to `.env.production`

#### development (docker)

for local development, execute these statements ONCE;
```bash
docker compose -f docker.compose.yml up -d
dotenv -f .env.development run npx prisma db push
dotenv -f .env.development run ts-node sampleData/initialDatabase.ts
```

run development server:
```bash
npm run dev
```

#### production

execute them once;
```bash
dotenv -f .env.production run npx prisma db push
dotenv -f .env.production run ts-node sampleData/initialDatabase.ts
```

Run the production server with this line;
```bash
npm run build
npm run start
```

## optional: Docker
building
```bash
docker build --tag tonylukeregistry.azurecr.io/tonylukeregistry/swe-library/app:latest .
```

running container locally
```bash
docker run --detach --publish 3000:3000 tonylukeregistry.azurecr.io/tonylukeregistry/swe-library/app:latest
```

### Running tests
```bash
npm run dev
npm run cypress:open
```