Skip to content

Commit b458ef7

Browse files
authored
Merge pull request #70 from IMTEL/69-prepare-for-first-realease
Preparation for first realease
2 parents 2f11b7b + d843cc5 commit b458ef7

3 files changed

Lines changed: 81 additions & 110 deletions

File tree

README.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,65 @@
1-
# LabManager
1+
# VR Lab Manager
2+
3+
The purpose of this project of is to create system for organizing and managing equipment in addition to managing borrowing and returning of equipment.
4+
Initially made for the IMTEL VR Lab at NTNU but it is also usable for other inventories.
5+
6+
## Features
7+
8+
- Add edit and delete equipment
9+
- Manage borrowing and returning of equipment
10+
- Keep track of borrowers and equipment usage
11+
- Manage inventory administrators
12+
13+
## Build and run your own instance
14+
15+
### Requirements
16+
17+
- A computer with Docker installed
18+
19+
### Instructions
20+
21+
1. Build a Docker image using the Dockerfile in ./labman. Run ``docker build -t labman .``
22+
2. Use the provided compose.yaml to run the application and make to make a .env file in the same directory containing the variables reqiored by compose.yaml.
23+
3. In compose.yaml, replace the labman image with name of the image you built in step 1.
24+
4. Start the application by running `docker compose up -d` in the same directory as compose.yaml
25+
5. Open `http://localhost:5000` and login with your own preferred credentials to start using the application
26+
27+
## Develop
28+
29+
### Database
30+
This project uses PostgreSQL as the database, using Prisma as the ORM.
31+
32+
1. Create a PostgreSQL database using your preferred method
33+
2. Make an .env file with the database connection string: `DATABASE_URL=postgres://{username}:{password}@{route}/{database}?schema=public
34+
35+
### Run the application
36+
37+
1. Clone the repository
38+
2. Run `cd labman`
39+
3. Run `npm install`
40+
4. Run `npm prisma generate` to generate the Prisma client
41+
5. Run `npm prisma migrate dev` to run the database migrations
42+
6. Run `npm run dev` to start the development server
43+
7. Open `http://localhost:3000` and login with your own preferred credentials to make a user to access the application
44+
45+
46+
# FAQ
47+
48+
- **Can I use this application for managing other types of inventory?**
49+
50+
Yes, the current name is misleading. The application is perfectly suitable for other things than VR equipment too.
51+
52+
- **I forgot the credentials to my accounts?**
53+
54+
As of now, there is no way to recover lost accounts. If no one has access to create a new account for you, you can directly manipulate the database to delete all users,
55+
which will force the creation of a new account on the next login attempt.
56+
57+
- **Is it safe to store sensitive information in the database?**
58+
59+
Everything is hosted locally with no external connections, and the login passwords are encrypted. Though if you are hosting the application publicly, it is your own responsibility to host it securely.
60+
61+
62+
63+
64+
65+

labman/LabManager-task-definition.json

Lines changed: 0 additions & 97 deletions
This file was deleted.

labman/src/app/(auth)/login/page.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,22 @@ export default function Home() {
3030

3131
}
3232
return (
33-
<div className="mx-auto w-fit">
34-
<h1 className="mx-auto w-fit font-bold text-6xl my-8">VR Lab Management</h1>
35-
<div className="my-80">
36-
<h1 className="font-bold text-5xl mx-auto w-fit">Login</h1>
37-
<form onSubmit={handleSubmit} className="flex flex-col gap-5 pt-4">
38-
<input value={username} onChange={(e) => setUsername(e.target.value)} type="text" name="username" placeholder="Username" className="bg-white rounded-md p-2 m-2 placeholder-black text-black" />
39-
<input value={password} onChange={(e) => setPassword(e.target.value)} type="password" name="password" placeholder="Password" className="bg-white rounded-md p-2 m-2 placeholder-black text-black" />
40-
<button type="submit" className="bg-green-500 text-black rounded-md p-2 m-2 font-bold">LOGIN</button>
41-
</form>
42-
</div>
43-
44-
</div>
33+
<>
34+
<div className="mx-auto w-fit">
35+
<h1 className="mx-auto w-fit font-bold text-6xl my-8">VR Lab Management</h1>
36+
<div className="my-80">
37+
<h1 className="font-bold text-5xl mx-auto w-fit">Login</h1>
38+
<form onSubmit={handleSubmit} className="flex flex-col gap-5 pt-4">
39+
<input value={username} onChange={(e) => setUsername(e.target.value)} type="text" name="username" placeholder="Username" className="bg-white rounded-md p-2 m-2 placeholder-black text-black" />
40+
<input value={password} onChange={(e) => setPassword(e.target.value)} type="password" name="password" placeholder="Password" className="bg-white rounded-md p-2 m-2 placeholder-black text-black" />
41+
<button type="submit" className="bg-green-500 text-black rounded-md p-2 m-2 font-bold">LOGIN</button>
42+
</form>
43+
</div>
44+
</div>
45+
<p className={"text-gray-300 text-2xl mb-3 ml-3 fixed bottom-0"}>v1.0.0</p>
46+
</>
47+
48+
4549

4650

4751
);

0 commit comments

Comments
 (0)