Skip to content

BlackShadeOSS/erasmus-gg

Repository files navigation

Erasmus-GG Project

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

User-facing API Endpoints

These endpoints require a logged-in user (auth-token cookie).

  • GET /api/user/profile – current user with selected profession
  • PUT /api/user/profile – update full_name and/or selected_profession_id
  • GET /api/user/profession – selected profession details
  • PUT /api/user/profession – set selected profession
  • GET /api/user/vocabulary – vocabulary for user's profession with difficulty and personal mastery
    • Query: professionId?, categoryId?, level?, search?, page?, limit?
  • PATCH /api/user/vocabulary – update mastery progress
    • Body: { vocabulary_id, mastery_level } or { vocabulary_id, delta }
  • GET /api/user/vocabulary/categories – categories for a profession
  • GET /api/user/vocabulary/progress – progress for a vocabularyId or summary for current profession
  • GET /api/user/professions – list active professions (for selection)
  • GET /api/user/videos – list active videos for user's profession (filter: difficulty, search, pagination)
  • GET /api/user/vocabulary/by-category – list vocabulary within a specific category
  • GET /api/user/vocabulary/by-level – list vocabulary at a specific difficulty level
  • GET /api/user/vocabulary/search – search vocabulary by term within a profession
  • GET /api/user/vocabulary/recommended – simple recommendation (lowest mastery first)

Debug page /testing/user now also:

  • Search vocabulary and update mastery inline
  • Test all user API endpoints including by-category, by-level, recommended
  • Live refresh functionality with loading states
  • Profile update testing

Recent Updates

Fixed vocabulary not refreshing after profession change by:

  • Added DB fallback for selected_profession_id in all vocabulary endpoints
  • Enhanced testing page with comprehensive endpoint testing
  • Added loading states and refresh functionality
  • Improved error handling and user feedback

All user API endpoints now properly handle profession changes and provide consistent data.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors