WatchList can be set up to run as a regular web application or a Progressive Web Application (PWA). It can be run with or without Docker.
- Check out the source and go to the root directory of the project.
- Edit config\default.json and fill in the following values:
- If you plan on using SQLite database, fill in the "SQLite" section. Create a username and password and use "WatchList" as the database name.
- If you plan on using SQL Server as the database, fill in the "SQLServer" section
- Secret: Create a long and secure password to encrypt your database
- Run
npm install
- Run
npm run build
- Run
npm run start
- Visit http://localhost:3000 in your browser. You should see the page to set up a new account.
- Enter the following fields:
- Name: Name of the new admin
- Username: New user name
- Password: Password that is complex. The password requirements are:1 lowercase alphabetical character, 1 uppercase alphabetical character, 1 numeric, 1 special char, 8 chars long minimum.
- Create the new account. You should see a message that the account creation was successfull. You should now be redirected back to the Login page. If not go to
http://YOURIP:8080/Login
. - Login using the credentials that you created above.
- Follow the instructions above but stop after running
npm run build
. - Build the Docker image:
docker buildx build . -t watchlist
. - Edit docker-compose.yml and update the network name to match your Docker network. You can create a docker network if you haven't done so already with the command
docker network create YourNetworkName
. - Build the Docker container:
docker-compose up -d
.
Setting up WatchList database for SQL Server (Optional: Skip this step if you want to use the default SQLite3 database)
- Create database with the name WatchList in SQL Server.
- Edit setup\SQL\Setup.sql and set the master key encryption password (write down this password in case you forget it!!)
- Run the SQL script SQL\Setup.sql on the database WatchList as a user with db_creator permission. All of the commands should complete without any errors.
- Create user account: Edit setup\SQL\CreateUser.sql and set the username, realname and password
- Run the SQL script setup\SQL\CreateUser.sql
- If you ever want to change a users' password, use the SQL at setup\SQL\SetPassword.sql
- If you want use WatchList as a PWA, make sure you should have the following files/folders in the build folder. If any of these files or folders are missing copy them from the public folder:
- assets
- favicon.ico
- manifest.json
- maskable.png
- service-worker.js
- After update WatchList, clear the browser cache in Google Chrome.
- Build the web app using the instructions above.
- Build the Desktop app for your OS:
- Windows: Open a command prompt and run
build-desktop-app.bat
. - Linux: Open Terminal and run
build-desktop-app-linux.sh
. - Mac: Open Terminal and run
build-desktop-app-mac.sh
.
- Windows: Open a command prompt and run
- When you run the app, you should see the WatchList login screen. If you see a blank screen, there is an easy way to fix this by editing index.html:
- Windows
- Open to the folder where the WatchList app is located. You should see watchlist.exe
- Index.html is located at resources\app\index.html
- Linux
- Open Terminal and go to the directory where the WatchList app is located. You should see watchlist.
- Index.html is located at resources/app/index.html
- Mac:
- Open Terminal and go to the directory where the WatchList app is located. You should see watchlist.app.
- Index.html is located at watchlist.app/Contents/Resources/app/index.html
- Windows
- Make sure that the line that loads
bundle.js
reads<script src="./bundle.js">
not<script src="/dist/bundle.js">
. - Re-run watchlist after saving index.html
If you cannot log into WatchList, you can reset the password directly in the database for the admin account that was created when you first set up WatchList.
- Install for your operating system
- Go to the directory where the watchlist database file is located
sqlite3 watchlistdb.sqlite
- Run
UPDATE Users SET Password='U2FsdGVkX18kOsqQBr1pTD01Xl7T+aPG7EQCl14pzLc=' SET WHERE UserID=1;
- Log into WatchList with the password "watchlist" without quotes.
- Go to the admin section and change your password