AnyLock Locker Management System is a web application to track the rental of lockers. With this system, you can assign users and administrators to rent, checkout, and manage lockers of any type. The program was made to be very generic, so that it can be used in almost any locker rental scheme. AnyLock was created to help people and businesses get a free solution to manage their locker systems. It is free to use and manipulate however you please under the MIT license.
This application was developed by the Summer 2020 Open Source team at Portland State University, consisting of:
A hosted version of the project can be accessed at: https://www.anylock.dev/
A demo of the system by the project team is available on YouTube: https://youtu.be/EWBP1J4dpsM
- Laravel PHP Framework (MIT License)
- Bootstrap CSS Library (MIT License)
- Google Fonts (Open Font License)
- JQuery (MIT License)
- FontAwesome (Free License)
- Background Locker Photo by moren hsu (Unsplah License) (Photo)
Note: This project was built using the base installation of the Laravel framework. Most of the code that was written by the project team exists in the following directories:
app/Http/Controllers
andapp/Http/Service
for the PHP code handling the HTTP requestsresources/views
for the HTML page tempatesroutes/web.php
androutes/api.php
for web routes
Code that was auto-generated by Laravel when creating the project has been marked with a comment at the top of the file.
Additionally, the Bootstrap documentation examples were sometimes used as a rough guide for our web page components. Generally, no examples were copied directly, but partial code samples from them may have been used in the development process. This notice is to preserve and comply with the MIT and CC BY 3.0 Bootstrap documentation licensing.
Finally, all the team members have previously worked on the Water Reuse Application open source project, also written in Laravel. Hence, small samples of code, designs and concepts were borrowed from our experience in building that application.
- PHP 7.4+ (https://www.php.net/)
- Composer (https://getcomposer.org/)
- Git
- A running Postgres instance
- Clone the project from this repository
cd AnyLock-LS
and runcomposer install
(see https://getcomposer.org/doc/01-basic-usage.md)- Run
cp .env.example .env
to make a copy of the .env file - In the
.env
file, fill in the database fields (starting with DB_CONNECTION through to DB_PASSWORD) - Run
php artisan key:generate
to generate an application key - Run
php artisan migrate
to build the database tables - Run
php artisan serve
to serve the project locally
For more information, or for information about hwow to deploy the application to a production webserver, please see the Laravel installation instructions.
Once you have your project running locally (or in production), do the following to set up the application:
- Create your account
- Set your account as an administrator through Postgres (run
UPDATE users SET is_admin='t' WHERE id=1;
) - Visit http://127.0.0.1:8000/admin/settings to set your organization name and tagline
- Visit http://127.0.0.1:8000/admin/locations/overview to create a new location, and specify the number of lockers you have
- You're all set to rent lockers!
There are 3 distinct categories of users we have defined:
- Public users (not authenticated)
- Registered users (authenticated, not admins)
- Administrator users (authenticated, admin)
Each of these 3 types of users are shown different versions of the sidebar and have access to different pages in the application.
To rent a locker, a user should go to the "Rent a Locker" page from the sidebar and follow onscreen instructions.
To confirm a locker rental, a user must come in person to a user with administrator access so that the administrator can physically check the user into their locker (by removing the default lock and allowing the user to put their own lock on). The administrator should find the user in the Pending Rentals page, and follow onscreen instructions to confirm their rental.
https://laravel.com/docs/7.x/testing To add more tests, Follow the documentation and create the test in feature or unit directory (depending on what the tests is for)
Laravel is a PHP web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects. Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
Please review the CONTRIBUTING.md file for instructions.
In order to ensure that our community is welcoming to all, please review and abide by the Code of Conduct.
This code is licensed under the MIT license.