hlasovatko-bachelor-thesis Svelte Themes

Hlasovatko Bachelor Thesis

An open-source polling platform for interactive voting. Full-stack app using .NET 8, SvelteKit, PostgreSQL, and Docker, developed as a part of bachelor's thesis.

About

A near real-time classroom engagement platform for improving and enriching the interaction between teachers and students. The frontend is built using Svelte and TypeScript. The backend is powered by ASP.NET Core and C#. The platform uses a PostgreSQL database, which can be managed with Adminer.

Running Locally

To run the project locally, you will need Docker and Docker Compose.

First, clone the repository:

git clone https://github.com/MiraZzle/hlasovatko-bachelor-thesis.git
cd hlasovatko-bachelor-thesis

Next, create a .env file in the root of the project with the following content (or just rename the file .env.example to .env):

# Port mappings
CLIENT_PORT=3000
MANAGER_PORT=3001
BACKEND_PORT=5000
DB_PORT=5432
ADMINER_PORT=8085

# URLs for services
VITE_BACKEND_URL=http://localhost/server
VITE_MANAGER_URL=http://localhost
VITE_CLIENT_URL=http://localhost/engage

# JWT config - used for auth
JWT_SECRET=3i6IyOHQPGT24Zpuv0yqI8QZoKAtS2Gl
JWT_EXPIRATION=1h
JWT_ISSUER=http://localhost/server

# PostgreSQL login credentials
DB_USER=postgres
DB_PASSWORD=1234
DB_NAME=engagenie

# Initial user login credentials - used for demo purposes
[email protected]
A_USER_PASSWORD=admin123456
A_USER_NAME="Admin Veliky"

Finally, run the following commands to build and start the application:

docker compose build --no-cache
docker compose up

The applications will be available at the following URLs:

Registering New Users

Use the register_user.sh script to quickly register a user via the API:

./register_user.sh "User Name" "[email protected]"

The password is entered securely after running the script.

Run with --help or -h flag to see usage instructions.

Testing

This project uses xUnit for Server unit testing.

[!WARNING] You must have the .NET CLI installed to run tests from the command line.

To run all tests, navigate to server.Tests directory and use:

dotnet test

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Commit messages should follow the Conventional Commits specification.

License

This project is licensed under the MIT License.

Made by Matěj Foukal, supervised by Mgr. Petr Škoda, Ph.D

Top categories

Loading Svelte Themes