Welcome to the Coding Riddles project! This project aims to create a website dedicated to coding riddles, similar to coding games but focused solely on riddles.
The primary goal of this project is to provide a platform where users can solve coding riddles and receive immediate feedback on their solutions. Riddles are often challenging to explain and validate, making it difficult to know if your solution is correct. This project aims to resolve that issue by offering a system that can accurately validate and provide feedback on riddle solutions.
- A collection of coding riddles of varying difficulty levels.
- An interface for users to submit their solutions and receive instant validation.
- Detailed explanations and hints for each riddle to aid in understanding and solving them.
- Java 23 (or use the provided Dockerfile)
- Node.js (for the frontend)
- Maven (for backend, or use
mvnw
/mvnw.cmd
) - Docker (optional, for containerized deployment)
- Build the backend:
cd backend ./mvnw clean package # or on Windows mvnw.cmd clean package
- Run locally:
java -jar target/coding-riddles.jar
- Run with Docker:
docker build -t codingriddles-backend . docker run -p 8080:8080 codingriddles-backend
- Install dependencies:
cd frontend npm install
- Run the dev server:
npm run dev
- Build the frontend and backend first:
cd frontend npm install npm run build cd ../backend ./mvnw clean package # or on Windows mvnw.cmd clean package cd ..
- Copy
.env.example
to.env
and fill in your database username and password:cp .env.example .env # Edit .env and set DB_USERNAME and DB_PASSWORD
- Start the backend and database together:
This will start both the PostgreSQL database and the backend, with credentials loaded from your
docker compose up --build
.env
file.
- The backend can still be deployed as a standalone JAR or Docker container.
- The frontend can be built with
npm run build
. You must then manually copy the output infrontend/dist
to the backend'ssrc/main/resources/public
directory:cp -r frontend/dist/* backend/src/main/resources/public/
- Rebuild and run the backend. The Spring Boot server will now serve the frontend at the root URL.
This project is licensed under a custom license. You may use, copy, modify, and distribute this software for personal and non-commercial purposes only. Commercial use is strictly prohibited without prior written permission from the author.
See the LICENSE file for full details.