Improve your language skills with inspiring images & immediate feedback!
Now that you've "climbed the mountain" of learning another language, keep your skills fresh with regular practice! Language output (speaking & writing) is key but can get dull with routine drills, plus you may never know if it's entirely correct.
🔸
With ALPs, every writing challenge comes with an inspiring image to ignite your imagination, a random verb & grammar points to help focus your language, and immediate feedback with the help of AI!
Visit the ALPs website!
- About The Project
- Getting Started
- Endpoints
- External APIs
- Stretch Technologies
- Future Iterations
- Contributors
🔸 Deployed Site
🔸 Backend Service
🔸 Front End Repository
ALPs was created by a cross-functional development team of students from the Turing School of Software and Design as their capstone project.
The mission of ALPs is to provide users with writing promts that ignite their imagination and provide immediate feedback on their language output.
Users simply choose their target language via an avatar to start a new challenge. When they begin, they'll see a random verb, inspiring image, and multiple grammar points to create fresh, unique sentences. Once they submit the challenge -- with the help of AI -- immediate feedback and correct sentences are provided so they can review and learn even faster!
This method is a flexible and iterative approach to project management that focuses on collaboration, adaptability, and continuous improvement.
The agile methodology
was chosen for backend development to expedite the app's launch and progressively abstract functions across multiple phases of development.
If you'd like to demo this API on your local machine:
- Ensure you have the prerequisites
- Sign up for external API Keys
- Clone this repo:
git clone git@github.com:A-L-P-s/ALPs_api_sqlite_finale.git
- Navigate to the root folder:
cd ALPs_api_sqlite_finale
- Run:
bundle install
- Run:
rails db:{create,migrate,seed}
- Run:
bundle exec figaro install
- In the
app/config/application.yml
file add you API keys:
UNSPLASH_API_KEY: add_api_key_here
OPENAI_API_KEY: add_api_key_here
- Inspect the
/db/schema.rb
and compare to the 'Schema' section below to ensure migration has been done successfully - Run:
rails s
- Visit http://localhost:3000/
- Ruby Version 3.1.1
- Rails Version 7.0.4.x
- Bundler Version 2.4.9
Sign up for your individual external API keys:
- Unsplash Image API
- Follow instructions provided.
- OpenAI API
- Once you have signed up, click on your profile at the top left and selecting
View API keys
. - Then click
Create new secret key
.
- Once you have signed up, click on your profile at the top left and selecting
To test the entire spec suite, run bundle exec rspec
.
All tests should be passing.
Happy path, sad path, and edge case testing were considered and tested. When a request cannot be completed, an error object is returned.
See Error Object
{
"errors": [
{
"status": "404"
"title": "Invalid Request",
"detail": "Couldn't find User with 'id'="
}
]
}
See All
ALPs API reutrns the folowing status codes:
Status Code | Description |
---|---|
200 | OK |
201 | CREATED |
204 | NO CONTENT |
404 | NOT FOUND |
418 | I'M A TEAPOT |
422 | UNPROCESSABLE CONTENT |
500 | INTERNAL SERVER ERROR |
GET "/api/v1/users"
Response:
Code | Description |
---|---|
200 | OK |
{
"data": [{
"id": "55",
"type": “user",
"attributes": {
"name": "Deniz",
"preferred_lang": "Turkish"
}},
{
"id": "1",
"type": “user",
"attributes": {
"name": "Alexis",
"preferred_lang": "Spanish"
}
}]
}
GET "/api/v1/users/:id"
Response:
Code | Description |
---|---|
200 | OK |
{
"data": {
"id": “55”,
"type": “user",
"attributes": {
"name": "Deniz",
"preferred_lang": "Turkish",
"challenges": [
{
"challenge_id": "1",
"language": "Turkish",
"verb": "(i) gitmek",
"eng_verb": "to go",
"image_url": "/random/unplash/image.url",
"image_alt_text": "Plane flying over the Bosphorous",
"created_at": "05/30/2023"
},
{ ...etc...}
]
}
}
}
GET "/api/v1/users/:id/challenges/new"
Response:
Code | Description |
---|---|
200 | OK |
"data": {
"id": null,
"type": “prompt",
"attributes": {
"user_id": = "55",
"language": "Turkish",
"verb": "(i) gitmek",
"eng_verb": "to go",
"image_url": "/random/unplash/image.url",
"image_alt_text": "Plane flying over the Bosphorous",
"grammar_points": [
{
"grammar_point": "şimdiki zaman (-iyor)",
"eng_grammar_point": "present/present continuous tense"
},
{
"grammar_point": "geniş zaman (-ir/-er)",
"eng_grammar_point": "simple present tense"
}
]
}
}
}
POST "/api/v1/users/:id/challenges"
Request Body:
{
"language": "Turkish",
"verb": "(i) gitmek",
"eng_verb": "to go",
"image_url": "/random/unplash/image.url",
"image_alt_text": "Plane flying over the Bosphorous",
"sentences": [
{
"grammar_point": "şimdiki zaman (-iyor)",
"eng_grammar_point": "present/present continuous tense",
"user_sent": "Bu yaz Hopa'ya gidiyorum." --> correct sentence <--
},
{
"grammar_point": "geniş zaman (-ir/-er)",
"eng_grammar_point": "simple present tense",
"user_sent": "Biz her yillar biz Fethiye'ye giderim." --> incorrect sentence <--
}
]
}
Response:
Code | Description |
---|---|
201 | CREATED |
{
"data": {
"id": “1”,
"type": “challenge"
}
}
GET "/api/v1/users/:id/challenges/:challenge_id"
Response:
Code | Description |
---|---|
200 | OK |
{
"data": {
"id": “1”,
"type": “challenge",
"attributes": {
"user_id": = "55",
"language": "Turkish",
"verb": "(i) gitmek",
"eng_verb": "to go",
"image_url": "/random/unplash/image.url",
"image_alt_text": "Plane flying over the Bosphorous",
"created_at": "05/30/2023",
"grammar_points": null,
"sentences": [
{
"id": "1",
"grammar_point": "şimdiki zaman (-iyor)",
"eng_grammar_point": "present/present continuous tense",
"user_sent": "Bu yaz Hopa'ya gidiyorum.",
"ai_sent": "Bu yaz Hopa'ya gidiyorum.",
"ai_explanation": "The sentence uses the correct grammar."
},
{
"id": "2",
"grammar_point": "geniş zaman (-ir/-er)",
"eng_grammar_point": "simple present tense",
"user_sent": "Biz her yillar biz Fethiye'ye giderim.",
"ai_sent": "Biz her yillar biz Fethiye'ye giderim.",
"ai_explanation": "The word 'yillar' should be 'yıl' and the verb ending must match 'biz' (we)."
}
]
}
}
}
DELETE "/api/v1/users/:id/challenges/:challenge_id"
Response:
Code | Description |
---|---|
204 | NO CONTENT |
- Used to generate the random theme image for every writing challenge.
- Used to correct sentences and provide immediate feedback on user's language output.
- Phase 2: Attempted to redeploy app with a PostgreSQL database, using AWS Elastic Beanstalk and RDS.
- Phase 3: Successfully redeployed app after changing database to SQLite3, using an AWS EC2 instance and Elastic IPs.
See Refactoring Suggestions
- 🔸 Add authorization & authentication
- - Allow users to create own profile and dashboard
- - Paid version to offer users individual OpenAI API key
- 🔸 Create administrative roles
- - Track statistics of all users and languages
- 🔸 Create microservices
- - For additional API calls, language exercises, nad futher abstraction of code
- 🔸 Expand AI functionality
- - Allow users to edit their first challenge attempt
- - Add multiple queries that checked for which language was written & which part of a sentence in incorrect
- - Include machine learning so AI can remember a user and can track commonly made errors
Caleb Thomas | James Taylor | Huy Phan | David Marino | Melony Erin Franchini |
BackEnd | BackEnd | BackEnd | BackEnd | BackEnd |
GitHub | GitHub | GitHub | GitHub | GitHub |
Kirk Hauck | Bea Ordonez | Katherine Blaine | Tyalor Pridgen | Brian Zanti |
FrontEnd | FrontEnd | FrontEnd | Project Mentor | Project Manager |
GitHub | GitHub | GitHub | GitHub | GitHub |