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
- Host: GitHub
- URL: https://github.com/tuke307/library-management
- Owner: tuke307
- Created: 2023-10-02T13:06:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T14:40:18.000Z (about 2 years ago)
- Last Synced: 2025-04-08T08:49:16.008Z (about 1 year ago)
- Topics: next-auth, next-js
- Language: HTML
- Homepage: https://library.tony-luke.de
- Size: 2.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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
```