FlashLearn is a Spring Boot application designed for studying and organizing learning materials using flashcards. The application features user authentication, role management, and CRUD operations for flashcard topics and individual flashcards. FlashLearn is built with a MongoDB backend for data persistence.
- As a user, I want to register an account so that I can access the application's features.
- As a user, I want to log in to my account to access my data and flashcards.
- As a user, I want to create new flashcard sets to organize my learning materials.
- As a user, I want to edit flashcard sets to update their content.
- As a user, I want to study flashcards in random order to improve my learning process.
- As a user, I want to change my password to ensure my account's security.
- Students preparing for exams.
- Professionals learning new skills or terminology.
- Improved learning efficiency by organizing materials into flashcard sets.
- Flexibility to study anytime and anywhere with a simple interface.
- User Management: Registration, login, and password change functionality.
- Flashcards Management: Create, delete, and study flashcard sets and individual flashcards.
- Topics Dashboard: View and manage topics and their associated flashcards.
- Dynamic Study Mode: Shuffle flashcards for effective learning.
AuthController: Handles authentication-related endpoints like login, registration, and password change.FlashcardController: Manages CRUD operations for flashcard sets and flashcards.StaticResourceController: Serves static resources like CSS files.
UserService: Handles business logic for user authentication, registration, and password management.FlashcardService: Manages flashcard sets and individual flashcards.
UserRepository: Interface for accessing user data in MongoDB.FlashcardSetsRepository: Interface for accessing flashcard sets in MongoDB.
User: Represents application users with fields for username, password, and role.FlashcardSet: Represents a flashcard set containing a title, description, and list of flashcards.Flashcard: Represents an individual flashcard with a name and description.
login.html: User login page.register.html: Registration page.dashboard.html: Displays all flashcard sets.form.html: Form for creating or editing flashcard sets.topic.html: View and manage individual flashcards in a topic.study.html: Study interface for flashcards.password_change.html: Page for changing user password.
application.properties: Contains application-level configurations, such as MongoDB connection details.SecurityConfig: Configures Spring Security, including URL access rules and CSRF settings.
styles.css: Custom styling for the application.
- Java 21 or higher
- MongoDB
- Clone the repository:
git clone <repository_url> cd FlashLearn
- Set up MongoDB:
- Ensure MongoDB is running on
localhost:27017with the database nameflashlearn(as defined inapplication.properties).
- Ensure MongoDB is running on
- Build the project:
./gradlew build
- Run the application:
./gradlew bootRun
- Open http://localhost:8080/ in a web browser
GET /login: Login page.POST /login: Submit login credentials.GET /register: Registration page.POST /register: Register a new user.
GET /flashcards: View all flashcard sets.POST /flashcards: Create a new flashcard set.GET /flashcards/topic/{title}: View details of a flashcard set.POST /flashcards/topic/{title}/add: Add a new flashcard to a set.POST /password_change: Change the user's password.POST /logout: Log out of the application.
Unit tests are located in FlashLearnApplicationTests.java and cover various scenarios, including:
- Redirects for unauthenticated users.
- Feedback during registration.
- Access control for protected pages.
Run the tests with:
./gradlew test- Backend: Spring Boot, Spring Security, Spring Data MongoDB
- Database: MongoDB
- Frontend: Thymeleaf, Bootstrap, Custom CSS
- Testing: JUnit, MockMvc
- Add support for admin roles to manage users.
- Enhance flashcard study mode with advanced algorithms (e.g., spaced repetition).
- Provide user statistics for learning progress.
Developed by Rafał Musiałowski 154141, Paweł Ćwik 149954, and Dawid Włodarczyk 152249.