4th Practical Class:
Hello, Project Server!
General Info
- Each team member will receive email with SSH access to team project user on server.
- one team project username with one password is shared in team
- Only difference from your normal SSH user is that project is located in different folder:
- normal user:
- team project user:
Project Template
- There is an initial project template set for you in when you SSH to team project user
- please use it as initial project template
- you can edit most of the code, but server is expecting some basic folder structure and some configuration
- your server may break if you:
- rename or delete / folders
- change some scripts / config in files
- installing NPM dependencies is ok ;)
- remove some files
- (take more caution when editing those files)
- your server may break if you:
- You can use SSH to edit the team project code, but suggested method is:
- each team should have its own repository given by POs on gitlab
- push generated project template to given repository
- each team member is working locally on clone of the repo
- contributions to project are done using Pull Requests
- you update team project on server using from / branch
- info and project development recommendations should be in the projects readme file
- contact klit17 on MS Teams if you encounter any problems
Production Builds / Update Server
- To create production build of frontend run in folder
- open: https://frontend--vse.handson.pro/ to see production frontend (it's same URL, but without prefix)
- production frontend is faster!
- To update backend server you have to run in the project root
- backend is always a production build (even with prefix in URL)
Initial Project Installation
-
connect to server using team's SSH
-
run following commands:
-
Environment Variables: You will receive database credentials via email
- The backend uses file
- Check that your file contains the correct from your email
- If working locally (not via SSH), copy the file to your local backend folder
-
example :
-
run following command:
-
open:
- https://dev-frontend--vse.handson.pro/
- https://dev-backend--vse.handson.pro/
- (replace with your team username)
Backend Architecture
The backend uses NestJS with Prisma ORM for database access:
- NestJS: A progressive Node.js framework with built-in GraphQL support
- Prisma ORM: Type-safe database toolkit with automatic migrations
- MySQL: Database with automatic seeding of initial data
- GraphQL: API using Apollo Server integration
Key Features:
- Automatic database seeding with sample data
- Type-safe database operations with Prisma
- GraphQL API with Apollo Server
- Modular architecture with dependency injection
- Built-in authentication and authorization