The primary purpose of this application is to generate an interactive 3D maze game for players to navigate and explore!
Through this explorative process of developing an application from start to finish, I hope to develop new skills in IaC automation, CI/CD pipelines, software architecture, 3D rendering on the web and fullstack development.
Note: From August, 2024 onward, service has been moved to vercel. You can check out this project at https://a-maze-ing-ivory.vercel.app
To setup local env, run the script ./set-local-env.sh
or manually copy .env.local
to .env
in frontend/
and backend/
.
To run the whole application, do docker compose up --build -d
( optionally, build and run each container separately)
docker kill <CONTAINER ID>
cd frontend && yarn start
-> localhost:5173/
cd backend
then you can either run go run .
or use the air
plugin for golang (preferred with live-reload) -> localhost:8080/
The following endpoints are currently currently well defined:
/maze/generate
generates a new maze and solution/maze/solve
solves an arbitrary perfect maze/maze?limit
returns a list of maze records ordered by solve_time
/maze/:user
returns a list of maze records belonging to a user/api-health
returns status = 200
if api is healthy/maze/:user
updates/create user's maze records/maze/:user
deletes a user's maze records// generate
{
width: number, 3 <= w <= 35
height: number, 3 <= h <= 35
generator: "prim" | "kruskal"
solver: "bfs" | "bbfs" | "dfs"
}
// solve
{
width: number, 3 <= w <= 35
height: number, 3 <= h <= 35
generator: "prim" | "kruskal"
solver: "bfs" | "bbfs" | "dfs"
maze: {
start: number,
end: number,
grid: [] // width x width matrix, try using output from generate
}
solution: [] // user's attempt at solving, program can validate
}
e.g generate a 20x20 maze with prim and solve using bfs
✅ -> Currently included, ❌ -> Not yet / partially
Frontend
Backend
DevOps & Infrastructure ✅
(Rook model used in the Svelte application) This work is based on "Low Poly Chess - Rook" (https://sketchfab.com/3d-models/low-poly-chess-rook-cbd416e785f64648bff3675fd45b3594) by marcelo.medeirossilva (https://sketchfab.com/marcelo.medeirossilva) licensed under CC-BY-NC-SA-4.0 (http://creativecommons.org/licenses/by-nc-sa/4.0/)