{"id":21289214,"url":"https://github.com/hexagontk/twitter_clone","last_synced_at":"2025-07-11T14:31:59.635Z","repository":{"id":90398851,"uuid":"212264187","full_name":"hexagontk/twitter_clone","owner":"hexagontk","description":"Mini Twitter Clone application developed using HexagonKt, Pebble and MongoDB","archived":false,"fork":false,"pushed_at":"2024-04-02T16:47:21.000Z","size":242,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T11:34:39.802Z","etag":null,"topics":["example","hacktoberfest","jvm","kotlin"],"latest_commit_sha":null,"homepage":"https://hexagontk.com","language":"Kotlin","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/hexagontk.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},"funding":{"github":["hexagonkt"]}},"created_at":"2019-10-02T05:44:46.000Z","updated_at":"2024-04-01T19:26:39.000Z","dependencies_parsed_at":"2024-03-21T17:59:41.433Z","dependency_job_id":"c3b572bf-3ac9-431d-abc1-198d438c1c5c","html_url":"https://github.com/hexagontk/twitter_clone","commit_stats":null,"previous_names":["hexagontk/twitter_clone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Ftwitter_clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Ftwitter_clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Ftwitter_clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Ftwitter_clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexagontk","download_url":"https://codeload.github.com/hexagontk/twitter_clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225731047,"owners_count":17515391,"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","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":["example","hacktoberfest","jvm","kotlin"],"created_at":"2024-11-21T12:36:31.230Z","updated_at":"2024-11-21T12:36:31.915Z","avatar_url":"https://github.com/hexagontk.png","language":"Kotlin","funding_links":["https://github.com/sponsors/hexagonkt"],"categories":[],"sub_categories":[],"readme":"\n# Twitter Clone\nThis is a Mini Twitter Clone application developed using Hexagon, based on\n[this](http://sparkjava.com/tutorials/twitter-clone) Spark tutorial. It makes use of Pebble to\nrender pages, and MongoDB for database functions.\n\n## Requirements\n* Java + Kotlin\n* Gradle\n* MongoDB\n\n## How to run\nNavigate to the project's root folder and run the following commands in order\n\n1. `./gradlew build`\n2. `./gradlew installDist`\n3. `./gradlew run`\n\nOpen `http://localhost:2010/` in your browser.\n\n## General Functionality\n* Sign up and register\n* Public and personal timelines\n* Follow/unfollow users\n* User pages\n\n## Architecture\nThe main class, which starts the server, is `Application.kt`.\n\nThe `models` package contains the models to be stored in the database.\n\nThe `routes` package contains the routing logic files.\n\n`Utils.kt` contains some general-purpose helper methods used in other parts of the application.\n\nInside `resources`, the `templates` folder contains the Pebble templates used to render webpages.\n`base.html` contains some common components such as the navbar, and other templates extend from this\nfile.\n\nThe `service.yaml` file defines several local settings such as the server port number, MongoDB URL,\netc. This can be modified, if required, based on local settings.\n\n## Endpoints\nNote: for all `POST` endpoints, data is expected in the form of form parameters\n(x-www-form-url-encoded).\n\n### `ANY /ping`\nA simple ping endpoint to check if the server is up and running.\n\n### `GET /`\nThe homepage. If no user is logged in, this redirects to `/public`, else a feed of messages of users\nfollowed by the currently logged in user is shown.\n\n### `GET /public`\nShows the list of messages from all users.\n\n### `GET /register`\nRenders the registration page.\n\n### `POST /register`\nRegisters the user.\n\nExpected data:\n* username\n* email\n* password\n\nIf registration is successful, redirects to `/login`.\n\n### `GET /login`\nRenders the login page.\n\n### `POST /login`\nLogs the user in. Logged in users are tracked using Session variables.\n\nExpected data:\n* email\n* password\n\nIf login is successful, redirects to the home page (`/`).\n\n### `GET /logout`\nLogs the user out and redirects to the home page (`/`).\n\n### `GET /user/follow/:username`\nAdds the currently logged in user as a follower of the user specified in the path.\n\n### `GET /user/unfollow/:username`\nRemoves the currently logged in user from the list of followers of the user specified in the path.\n\n### `GET /user/:username`\nRenders the user page, containing the feed of messages sent by the user.\n\n### `POST /message`\nCreates a message and associates it with the currently logged in user.\n\nExpected data:\n* message\n\nIf successful, redirects to the public timeline (`/public`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexagontk%2Ftwitter_clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexagontk%2Ftwitter_clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexagontk%2Ftwitter_clone/lists"}