Picto Lingua is a language learning application that helps users learn vocabulary words in context through images. The application presents users with images representing different themes, and then provides vocabulary words related to those themes.
- Theme-based learning with visual context
- Multiple language support (English and Dutch)
- Flashcard game mode for vocabulary practice
- Image selection from Unsplash API
- Vocabulary generated through OpenAI
- Session-based progress tracking
- Frontend: React
- Backend: Golang
- APIs: Unsplash, OpenAI
- Go 1.16+
- Node.js 14+
- npm or yarn
- Unsplash API key
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/picto-lingua-react-go.git cd picto-lingua-react-go
-
Set up environment variables
cp .env.example .env
Edit the
.env
file to add your Unsplash and OpenAI API keys. -
Run the backend
cd backend go run main.go
The server will start on port 8080 (or the port specified in your .env file)
-
Install dependencies
cd frontend npm install
-
Start the development server
npm start
The React app will be available at http://localhost:3000
GET /api/images?theme=<theme>
- Get images for a specific theme
GET /api/vocabulary?theme=<theme>&count=<count>&language=<language>
- Get vocabulary words for a specific theme and languagelanguage
parameter can be "english" (default) or "dutch"
POST /api/session
- Create or update a sessionGET /api/session?session_id=<session_id>
- Get a session by ID
GET /api/themes
- Get all available themes
picto-lingua-react-go/
├── backend/ # Go backend
│ ├── api/
│ │ ├── handlers/ # API endpoint handlers
│ │ ├── models/ # Data models
│ │ └── services/ # Service layer (Unsplash, OpenAI, etc.)
│ ├── config/ # Configuration management
│ ├── utils/ # Utility functions
│ ├── main.go # Application entry point
│ ├── go.mod # Go module definition
│ └── go.sum # Go module checksums
├── frontend/ # React frontend
│ ├── public/ # Static files
│ └── src/
│ ├── components/ # React components
│ ├── services/ # API service layer
│ └── App.js # Main application component
├── .env # Environment variables
├── .gitignore # Git ignore rules
└── README.md # Project documentation
This project is licensed under the MIT License - see the LICENSE file for details.