Compiling and running this is straightforward and only needs Java to be installed, however if you want to jump straight to running the server head over to releases and grab the newest one. It's a background process so I recommend you starting it in a console if you want to shut it down easily.
java -jar cinema.jar
This application provides an interface for cinema employees top schedule movie screenings and for users to get tickets for such screenings.
Users can register on the homepage, after logging in they can view a list of available movies and then apply to it by buying tickets.
Admins can create movies and events.
The project supposed to be built into a single java executable which contains both the backend and the frontend. The application has to be secured via tokens to not let unauthorized access to non-users. The application has to implement multi grouped user categories in which we can distinguish between managers, admins and regular users.
Keep every asset of the project fresh and updated.
- / - Readme, License, Backend POM
- /.doc - documentation related files
- /.hotswap - bundled jars to enable JVM hot-swap
- /.mvn - maven wrapper
- /.postman - postman profiles for rest endpoint manual testing
- /.vscode - VS Code settings
- /src - Project source
- /main - Project source
- /java - Project source
- /hu/elte/assignment - Backend Sources
- /config - Spring Configurations (Non Security)
- /controller - REST Endpoints
- /data - ORM descriptions
- /model - Entities
- /repository - Spring Repositories
- /security - Security Config and Token provider
- /service - Services
- /auth - Authentication Services
- /hu/elte/assignment - Backend Sources
- /resources - Backend project resources, application config, initial data sql
- /static - The frontend project will be stored here after building
- /web - Fronted project root. Angular, npm, ts, tslint and proxy settings
- /e2e - End to end testing
- /src - Frontend sources, main.ts, index.html, styles.scss
- /app - Angular sources, routing, main app module
- /components - Components
- /directives - Directives
- /model - Rest API object models
- /modules - Modules
- /services - Services
- /environments - App Configs
- /app - Angular sources, routing, main app module
- /java - Project source
- /test - Backend testing
- /main - Project source
- / - The root redirects you to the angular application
- /rest/ - Every endpoint in the backend is under the rest keyword
- /rest/public/ - Non Secured endpoints
- /rest/public/users/ - Non secured user endpoint
- /rest/public/users/register POST Registers a user based on the body of the request
- /rest/public/users/login POST Creates a token for the user based on the user credentials in the body
- /rest/users - Secured user endpoints
- /rest/users/current GET - Queries the current user. Testing purposes only as the user is described in the token and gets injected from that already
- /rest/users/logout POST - Not necessary on server side with token based authentication but I provide a way to blacklist your token with this endpoint
- /rest/cinema/ - Secured cinema actions
- /rest/movies POST - Create a movie
- /rest/movies PUT - Update a movie (Has an ID)
- /rest/movies/:id DELETE - Deletes a movie
- /rest/movies/:id GET - Reads a movie
The backend security solution is based on this article and a few tweaks here and there to support my use case.
The frontend uses the JWTModule to inject the bearer token into the headers of each call heading towards the API.
An interceptor refreshes the token on each http request so it never expires while in the application is in use.
- Admin
- User
If you're not running this project from a recommended environment (IntelliJ or VS Code) You can still run it using the command line:
./mvnw spring-boot:run
If you want to use hot reload (and your JVM is capable) just pass the -P dev profile parameter and it will use the necessary JVM arguments.
./mvnw -P dev spring-boot:run
Frontend framework
Backend framework
Token based authentication and authorization
In-memory database for development
Package manager for JS projects
JS Runtime featuring V8 from chromium
Build tool for the whole project. Can build and package the frontend too for static hosting
CSS extension
Drag and drop made really easy
Datatable, the best
Icons, awesome ones
Java IDE for the backend of this project
IDE for mainly the frontend but can be used for both. Settings
Linting in IDEA for java Install this plugin if you're using IntelliJ
Hot Reload capable alternative JVM
Download the latest release of DCENV Light binary, run it with administrator privileges and install it as an alternative JVM
java -jar DCEVM-8u181-installer.jar
This also needs a Hot Swap Agent. Download the latest and place it somewhere in your computer. I already provided one in the .hotswap folder of this repository.
To be able to use the newly installed alternative VM you have to provide the necessary VM arguments. You also need to provide the newly downloaded agent aswell. If you use IntelliJ to start the Spring-Boot application you can do this by opening up the 'Environment' panel and putting this in the VM Options field.
-XXaltjvm=dcevm -javaagent:./.hotswap/hotswap-agent-1.3.0.jar=autoHotswap=true
REST endpoint testing
Font with ligatures
Reload the Page for Chrome when the server changes
Inspect tokens in chrome to check the payload of your token stored in the local storage
Compile time magic before compile time Install this plugin if you're using IntelliJ
Package Manager for Windows
Command Line Tools for Travis
You need ruby to use the Travis CLI
Windows:
choco install ruby
then follow the instructions on the link given
Clean big files from the git history
Git repository
Continuous Integration solution
To setup automatic deployment to Heroku through travis you either enable the Travis app on Github and then enable CI on Heroku or you tell Travis to deploy to Heroku in the configuration file of Travis. The Travis CLI has a wizard for setting up this entry. You need both Travis and Heroku CLI's installed.
travis setup heroku
Deployment Platform
Code review tool
Code review tool for maintainability
Badges to look cool