{"id":24798802,"url":"https://github.com/403errors/myjournalapp","last_synced_at":"2025-03-24T22:41:53.620Z","repository":{"id":177470761,"uuid":"659057322","full_name":"403errors/myJournalApp","owner":"403errors","description":"MyJournalApp is a simple and intuitive web application designed for researchers, scholars, and anyone who wants a minimal and organized space to store their thoughts and writing. Built with Node.js and Express.js, it provides a straightforward way to create and manage journal entries without the need for user authentication.","archived":false,"fork":false,"pushed_at":"2025-01-19T05:30:33.000Z","size":431,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T02:15:15.263Z","etag":null,"topics":["blog-application","css","ejs","javascript","journal-app"],"latest_commit_sha":null,"homepage":"https://myjournalapp.onrender.com/","language":"EJS","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/403errors.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":"2023-06-27T04:01:39.000Z","updated_at":"2025-01-19T05:31:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7b659e2-3dbc-478c-adf8-484e8c400c37","html_url":"https://github.com/403errors/myJournalApp","commit_stats":null,"previous_names":["sitama-from-iitm/myjournalapp","403errors/myjournalapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FmyJournalApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FmyJournalApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FmyJournalApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/403errors%2FmyJournalApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/403errors","download_url":"https://codeload.github.com/403errors/myJournalApp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366200,"owners_count":20603438,"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":["blog-application","css","ejs","javascript","journal-app"],"created_at":"2025-01-30T02:15:18.200Z","updated_at":"2025-03-24T22:41:53.590Z","avatar_url":"https://github.com/403errors.png","language":"EJS","readme":"# MyJournalApp\n\nMyJournalApp is a simple and intuitive web application designed for researchers, scholars, and anyone who wants a minimal and organized space to store their thoughts and writing. Built with Node.js and Express.js, it provides a straightforward way to create and manage journal entries without the need for user authentication.\n\nUsers can easily submit articles with a title and body, which are then displayed on the home page. Clicking on an article's title leads to a dedicated page for reading the full entry. This application focuses on providing a clean and efficient way to organize and track your writing work.\n\nHosted on: https://myjournalapp.onrender.com/\n\n\u003e May take upto 30 seconds to load on your browser as its running on free instance.\n\n## Tech Stack\n\n*   **Backend:**\n    *   [Node.js](https://nodejs.org/): A JavaScript runtime built on Chrome's V8 JavaScript engine.\n    *   [Express.js](https://expressjs.com/): A minimalist web application framework for Node.js.\n    *   [body-parser](https://github.com/expressjs/body-parser): Node.js body parsing middleware to handle the request body.\n*   **Frontend:**\n    *   [EJS](https://ejs.co/): Embedded JavaScript templates for creating dynamic HTML content.\n    *   JavaScript: For basic front-end functionality (though minimal in this application).\n    *   CSS: For styling the application's user interface.\n*   **Utilities:**\n    *   [lodash](https://lodash.com/): A utility library delivering consistency, customization, performance, and extras.\n\n## How It Works\n\nThe application follows a standard Model-View-Controller (MVC) like structure, primarily handled within the `app.js` file and the `views` directory.\n\n1. **Initialization:** The `app.js` file sets up an Express.js server. It utilizes `body-parser` middleware to handle data submitted through forms and configures EJS as the templating engine. Static assets (like CSS) are served from the `public` directory.\n\n2. **Data Storage:** The application uses an in-memory array called `posts` to store journal entries. This means that the entries are not persistent and will be lost when the server restarts.\n\n3. **Routes:** The application defines several routes to handle different actions:\n    *   `/`:  Renders the `home.ejs` template, displaying the `homeStartingContent` and a list of submitted posts.\n    *   `/about`: Renders the `about.ejs` template, displaying information about the application.\n    *   `/contact`: Renders the `contact.ejs` template, displaying contact information.\n    *   `/compose`: Renders the `compose.ejs` template, providing a form for submitting new journal entries.\n    *   `/posts/:postName`:  Handles requests for individual posts. It uses `lodash`'s `_.lowerCase` function to compare the requested post title with the stored post titles (case-insensitive).\n\n4. **Composing New Posts:**\n    *   When a user submits the form on the `/compose` page (via a `POST` request to `/compose`), the application extracts the `postTitle` and `postContent` from the request body.\n    *   A new `post` object is created with the extracted data and pushed into the `posts` array.\n    *   The user is then redirected to the home page (`/`), where their new post is now displayed.\n\n5. **Viewing Individual Posts:**\n    *   When a user clicks on a post title on the home page, the application makes a `GET` request to `/posts/:postName`.\n    *   The `:postName` parameter in the URL is captured.\n    *   The application iterates through the `posts` array, comparing the lowercase version of the requested `postName` with the lowercase version of each stored post's title.\n    *   If a match is found, the `post.ejs` template is rendered, displaying the title and content of the selected post.\n\n## Installation and Setup Instructions\n\n1. **Clone the repository:**\n    ```bash\n    git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git\n    cd YOUR_REPOSITORY\n    ```\n\n2. **Install dependencies:**\n    Make sure you have [Node.js](https://nodejs.org/) and npm installed on your machine.\n    ```bash\n    npm install\n    ```\n\n## Usage\n\n1. **Start the server:**\n    ```bash\n    npm start\n    ```\n    This will start the server, and you should see \"Server started on port 3000\" in your console.\n\n2. **Open the application in your browser:**\n    Navigate to `http://localhost:3000` in your web browser.\n\n3. **Composing a new post:**\n    *   Click on the \"Compose\" link in the navigation bar.\n    *   Enter the title and content of your journal entry in the provided form.\n    *   Click the \"Publish\" button. Your new post will now appear on the home page.\n\n4. **Viewing a post:**\n    *   On the home page, click on the title of any post to view its full content on a separate page.\n\n## Project Status\n\nThis project is currently in development. While the core functionality of creating and viewing posts is complete and functional on desktops, the following features are still in progress:\n\n*   Mobile view optimization\n*   Functionality to delete posts\n\n## Screenshots\n\n![Home Section](/imgs/home_section.png)\n\n---\n\n![Compose Section](/imgs/compose_section.png)\n\n---\n\n![Post Section](/imgs/post_section.png)\n\n## Contributing\n\nContributions are welcome! If you have suggestions for improvements or find any issues, please feel free to open a pull request or submit an issue on the GitHub repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F403errors%2Fmyjournalapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F403errors%2Fmyjournalapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F403errors%2Fmyjournalapp/lists"}