{"id":22826875,"url":"https://github.com/wassim-rached/sawti-web-client","last_synced_at":"2026-04-19T06:49:00.934Z","repository":{"id":267439169,"uuid":"896157650","full_name":"Wassim-Rached/Sawti-Web-Client","owner":"Wassim-Rached","description":"Modern election platform for secure voting, candidate profiles, managing favorites, and user comments with responsive design. (Web Client)","archived":false,"fork":false,"pushed_at":"2024-12-10T10:18:35.000Z","size":822,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T18:50:29.617Z","etag":null,"topics":["nextjs15","tailwind","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wassim-Rached.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-29T17:01:34.000Z","updated_at":"2024-12-10T10:18:38.000Z","dependencies_parsed_at":"2024-12-10T11:27:32.391Z","dependency_job_id":"501623e4-30fe-46b2-8d2d-0957d47364d1","html_url":"https://github.com/Wassim-Rached/Sawti-Web-Client","commit_stats":null,"previous_names":["wassim-rached/sawti-web-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Wassim-Rached/Sawti-Web-Client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wassim-Rached%2FSawti-Web-Client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wassim-Rached%2FSawti-Web-Client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wassim-Rached%2FSawti-Web-Client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wassim-Rached%2FSawti-Web-Client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wassim-Rached","download_url":"https://codeload.github.com/Wassim-Rached/Sawti-Web-Client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wassim-Rached%2FSawti-Web-Client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740725,"owners_count":24812642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["nextjs15","tailwind","typescript"],"created_at":"2024-12-12T18:06:37.251Z","updated_at":"2026-04-19T06:49:00.886Z","avatar_url":"https://github.com/Wassim-Rached.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Technical Documentation\n\n## Presidential Election Management Application (Sawti)\n\n### **1. Introduction**\n\n- **Project Summary**:  \n  This project involves developing a web application for managing presidential elections. The application provides features such as user registration, candidate consultation, voting, and real-time result tracking.\n\n---\n\n### **2. Application Architecture**\n\n- **Technology Stack**:\n\n  - **Frontend**: Next.js, Tailwind CSS, HeroIcons (Icons), React-Toastify (Notifications)\n  - **Backend**: Node.js, Express, Zod (validation), Bcrypt (password hashing), JsonWebToken (JWT), Mongoose (MongoDB connection), NanoId (unique ID generation)\n  - **Database**: MongoDB\n  - **Authentication**: JSON Web Tokens (JWT)\n\n- **Architecture Diagram**:\n  ![Arch](./public/sawti_arch.png)\n\n---\n\n### **3. Main Features**\n\n1. **Registration / Login**\n\n   - Users register using their CIN (national identity number), password, and other infos.\n   - Authentication is securely handled via JWT.\n\n2. **User Profile**\n\n   - Users can view and modify personal information (e.g., first name, last name, etc.).\n\n3. **Candidate Consultation**\n\n   - A complete list of candidates is displayed with their biographies and electoral programs.\n   - Users can view details about individual candidates.\n\n4. **Voting**\n\n   - Users can securely cast their votes (one vote per user).\n   - Backend ensures eligibility before processing the vote.\n\n5. **Commenting**\n\n   - Users can comment on candidates' programs to express their opinions.\n\n6. **Real-time Election Results**\n\n   - Results are displayed as the total number of votes for each candidate.\n   - Dynamic updates occur via a user-triggered refresh button.\n\n7. **Favorites**\n\n   - Users can add candidates to a personal favorites list to quickly access their profiles.\n\n8. **Search**\n   - A search bar allows users to filter candidates by name.\n\n---\n\n### **4. Technologies Used**\n\n- **Frontend**:\n\n  - **Next.js**: For building the user interface quickly and effectively.\n  - **Tailwind CSS**: For creating a responsive and modern design.\n  - **HeroIcons**: For scalable SVG-based icons.\n  - **React-Toastify**: For displaying toast notifications to users.\n\n- **Backend**:\n\n  - **Node.js**: For running the server.\n  - **Express**: For building RESTful APIs.\n  - **Zod**: For request validation.\n  - **Bcrypt**: For securely hashing user passwords.\n  - **JsonWebToken (JWT)**: For secure user authentication.\n  - **Mongoose**: For managing MongoDB schemas and queries.\n  - **NanoId**: For generating unique identifiers.\n\n- **Database**:\n\n  - **MongoDB**: NoSQL database for storing user, candidate, vote, and comment data.\n\n- **Authentication**:\n\n  - **JWT (JSON Web Tokens)**: Ensures secure authentication and user session handling.\n\n- **Deployment**:\n  - **Vercel**: Deployed for hosting the frontend application.\n  - **Render**: Backend services deployed securely for API handling.\n\n---\n\n### **5. Development Tools**\n\n- **Visual Studio Code**: Code editor for development.\n- **Git**: Version control for tracking changes and collaboration.\n- **Postman**: For testing and debugging API endpoints.\n- **ESLint / Prettier**: For maintaining consistent coding standards.\n\n---\n\n### **6. Development Team**\n\n- **Wassim Rached**:\n  - Backend developer with a passion for software architecture and cloud engineering.\n  - Currently studying at the Higher Institute of Technological Studies in Charguia.\n  - More information can be found at [www.wassimrached.me](https://www.wassimrached.me).\n\n---\n\n### **7. Use Cases**\n\n1. **User Registration**\n\n   - Users provide their CIN and password via a registration form.\n   - Backend validates the data, hashes the password, and creates a user account in MongoDB.\n\n2. **User Login**\n\n   - Users provide their CIN and password.\n   - Backend verifies the credentials and generates a JWT for session management.\n\n3. **Consult Candidates**\n\n   - Users browse a list of candidates and can view detailed profiles, including biographies and electoral programs.\n\n4. **Voting**\n\n   - Users select a candidate and securely cast their votes.\n   - Backend ensures the user has not voted more than once.\n\n5. **Displaying Results**\n\n   - Users can view the total number of votes for each candidate.\n   - Refreshing the results updates the data dynamically.\n\n6. **Commenting**\n\n   - Users can submit comments on candidates’ electoral programs.\n   - Comments are stored in the database and displayed under the candidate profiles.\n\n7. **Search Candidates**\n\n   - Users can search for candidates by name using the search bar.\n\n8. **Favorites**\n   - Users add candidates to a favorites list for quick access.\n   - Favorites are stored in the user’s profile for persistence.\n\n---\n\n### **8. Future Enhancements**\n\n- Implement real-time voting updates using **WebSockets**.\n- Add support for multi-language localization (e.g., English, Arabic).\n- Introduce advanced analytics and visualizations for election results using charting libraries (e.g., Chart.js, D3.js).\n- Extend the platform to manage legislative or regional elections.\n- Improve server performance using caching mechanisms like **Redis**.\n\n---\n\n### **9. Conclusion**\n\n- This application demonstrates the use of modern web technologies to deliver a secure, user-friendly platform for managing presidential elections.\n- With its modular design and robust architecture, the application is scalable and can be extended with additional features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassim-rached%2Fsawti-web-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwassim-rached%2Fsawti-web-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassim-rached%2Fsawti-web-client/lists"}