{"id":27786357,"url":"https://github.com/iamigi/sentiment-analysis","last_synced_at":"2026-01-24T16:05:52.076Z","repository":{"id":285617459,"uuid":"958715716","full_name":"IamIGI/sentiment-analysis","owner":"IamIGI","description":"Sentiment analysis frontend app built with Svelte, TypeScript, and SCSS. It allows users to input a short text and analyze its sentiment (positive, neutral, or negative) using the Hugging Face Inference API.","archived":false,"fork":false,"pushed_at":"2025-04-07T06:44:55.000Z","size":144592,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T16:02:49.835Z","etag":null,"topics":["husky","scss-styles","sveltekit","typescript","unit-testing"],"latest_commit_sha":null,"homepage":"https://sentiment-analysis-alpha-seven.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IamIGI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-01T16:41:19.000Z","updated_at":"2025-04-07T06:44:58.000Z","dependencies_parsed_at":"2025-04-01T19:25:35.123Z","dependency_job_id":"63aa808a-5d47-4786-85a7-cf76a7ae303e","html_url":"https://github.com/IamIGI/sentiment-analysis","commit_stats":null,"previous_names":["iamigi/sentiment-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IamIGI/sentiment-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamIGI%2Fsentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamIGI%2Fsentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamIGI%2Fsentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamIGI%2Fsentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamIGI","download_url":"https://codeload.github.com/IamIGI/sentiment-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamIGI%2Fsentiment-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["husky","scss-styles","sveltekit","typescript","unit-testing"],"created_at":"2025-04-30T15:59:57.152Z","updated_at":"2026-01-24T16:05:52.058Z","avatar_url":"https://github.com/IamIGI.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💬 Sentiment Analyzer\n\n### eng\n\nSentiment analysis frontend app built with **Svelte**, **TypeScript**, and **SCSS**. It allows users to input a short text and analyze its sentiment (positive, neutral, or negative) using the Hugging Face Inference API.\n\n### pl\n\nAplikacja frontendowa do analizy sentymentu stworzona przy użyciu Svelte, TypeScript i SCSS. Umożliwia użytkownikowi wprowadzenie krótkiego tekstu i analizę jego sentymentu (pozytywny, neutralny lub negatywny) za pomocą API Hugging Face Inference.\n\n## Linki:\n\n- Strona: https://sentiment-analysis-alpha-seven.vercel.app\n- Projekt: https://github.com/users/IamIGI/projects/18/views/1\n\n---\n\n## 🇵🇱 Instrukcja uruchomienia projektu (PL)\n\n1. Sklonuj repozytorium:\n\n   ```bash\n   git clone https://github.com/IamIGI/sentiment-analysis.git\n   cd sentiment-analyzer\n   ```\n\n2. Zainstaluj zależności:\n\n   ```bash\n   npm install\n   ```\n\n3. Utwórz plik `.env` w katalogu głównym projektu i dodaj swój token API:\n\n   ```\n   HUGGINGFACE_ACCESS_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n   ```\n\n4. Aby uzyskać token:\n\n   - Zarejestruj się na stronie [Hugging Face](https://huggingface.co/join)\n   - Przejdź do `Settings → Access Tokens`\n   - Wygeneruj darmowy token (scope: Inference API)\n\n5. Uruchom aplikację lokalnie:\n   ```bash\n   npm run dev\n   ```\n\n---\n\n## 🇺🇸 Project Setup Instructions (EN)\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/your-username/sentiment-analyzer.git\n   cd sentiment-analyzer\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a `.env` file in main project dictionary and insert your Hugging Face token:\n\n   ```\n   HUGGINGFACE_ACCESS_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n   ```\n\n4. To get the token:\n\n   - Register at [Hugging Face](https://huggingface.co/join)\n   - Go to `Settings → Access Tokens`\n   - Generate a free token with API access\n\n5. Run the development server:\n   ```bash\n   npm run dev\n   ```\n\n---\n\n## 🧱 Użyte technologie / Technologies Used\n\n- **SvelteKit (v5)**\n- **TypeScript**\n- **SCSS**\n- **Hugging Face Inference API**\n- **ESLint** + **Prettier**\n- **Husky** (pre-commit hooks)\n\n---\n\n## ⚙️ Wyzwania napotkane podczas realizacji zadania / Challenges Faced\n\n### pl\n\n- 🇵🇱 _Z uwagi na prostotę aplikacji, sporo czasu poświęciłem na odpowiedni layout. Finalnie zdecydowałem się na nagranie wideo w tle oraz gradientowy styl tła z zewnętrzną ramką aby przciągnąć uwagę w centrum aplikacji. Początkowa implementacja ramki z gradientem z użyciem pseudoelementu `::before` nie działała poprawnie przy przezroczystym tle, dlatego użyłem dodatkowego kontenera. Wymagane było przez to ustawienie wymiarów okna modalnego na sztywno czego nie jestem fanem... co skomplikowało RWD._\n\n- 🇵🇱 Pierwszy raz pracowałem z oknami modalnymi w Svelte 5 – zauważyłem brak możliwości ich niszczenia przez `.destroy()`, tak jak w Svelte 4 co uważam za minus nowej wersji. Nowe podejście zarządzanie modalami oparte na callbackach przypomina mi React. Również użycie `@render children()` zamiast `\u003cslot /\u003e` na  nie jest tak intuicyjne i szybkie jak w SVELTE.4, ale przynajmniej pozbyliśmy się `$` na rzecz `effect()`. 😊\n\n- 🇵🇱 _Konfiguracja Husky'ego była dla mnie nowością – wcześniej takie kontrole kodu mieliśmy ustawione tylko na pipeline'ach, lub projekt posiadał już skonfigurowanego husky-ego_\n\n- 🇵🇱 Z tego co przeczytałem w dokumentacji \"Hugging Face\", ich API nie posiada wsparcia dla GRAPHQL.\n\n- 🇵🇱 Dokumentacja wymagała aby przycisk wysłania formularza posiadał tekst \"Analizuj\", zatem język polski. Poszedłem zatem za ciosem i cała aplikacja posiada interfejs w języku polskim, jednak chciałbym zaznaczyć, że użyty LLM do analizy tekstu nie radzi sobie zbyt dobrze z frazami w jęzku polskim, przez co biłem się parę razy z myślami aby zmienić jednak język interfejsu na angielski... co by sugerował wpisywanie fraz właśnie w tym języku\n\n- 🇵🇱 Przy nawiązywaniu połączeń po stronie klienta, token autoryzacyjny jest widoczy w nagłówkach, zatem zdecydowałem się na proxy - serwer svelte-a pośredniczy w żadaniu między klientem a API, dzieki temu token nie jest widoczny na zewnątrz.\n\n- 🇵🇱 W odróżnieniu od innych frameworków, Svelte oferuje bardzo szybkie, wbudowane i intuicyjne zarządzanie store'ami. Jednak w przypadku tak niewielkiej aplikacji, nie uważam, aby deklaracja store'a była konieczna.\n\n### eng\n\n- 🇬🇧 Due to the simplicity of the application, I spent quite a bit of time crafting a compelling layout. I ultimately decided on using a recorded video and a gradient background with an outer frame to draw attention to the center of the app. My initial implementation using ::before didn't work well with a transparent background, so I opted for an extra container. For the modal, I had to hardcode the dimensions—which I'm not a fan of—which complicated responsive design.\n\n- 🇬🇧 Surprisingly, it was my first time working with modals in Svelte 5 — I noticed the lack of `.destroy()` method that we had in Svelte 4, which I consider a downside. The new callback-based modal management feels much more like React. Also, the shift from `\u003cslot /\u003e` to `@render children()` doesn't feel as intuitive or quick as in Svelte 4. Still, at least we’ve gotten rid of `$` in favor of `effect()`, which is a win overall. 😊\n\n- 🇬🇧 Setting up Husky was a new experience for me — previously, code quality checks were mostly handled via CI pipelines or the project already came with Husky configured.\n\n- 🇬🇧 From what I read in the \"Hugging Face\" documentation, their API does not support GRAPHQL\n\n- 🇬🇧 The documentation required the form submission button to have the text \"Analizuj\", so the Polish language, so I went with the flow and the entire application has an interface in Polish, but I would like to point out that the LLM used for text analysis does not cope very well with phrases in Polish, which is why I wrestled with the idea of ​​changing the interface language to English a few times... which would suggest entering phrases in that language.\n\n- 🇬🇧 When establishing connections on the client side, the authorization token is visible in the headers, so I decided to use a proxy - the svelte server acts as an intermediary in the request between the client and the API, thanks to which the token is not visible to the outside.\n\n- 🇬🇧 Unlike other frameworks, Svelte offers fast, built-in, and intuitive store management. However, for such a small application, I don't think it's necessary to declare a store.\n---\n\n## 📝 License\n\nThis project is open-source and available for educational and showcase purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamigi%2Fsentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamigi%2Fsentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamigi%2Fsentiment-analysis/lists"}