Skip to content

RedNews is a modern online portal designed for publishing, managing, and organizing news articles 📑

License

Notifications You must be signed in to change notification settings

Adamanr/RedNews

Repository files navigation

News Portal - RedNews 📰

RedNews is a modern online portal designed for publishing and managing news and articles. This tool allows you to create and publish articles, share the latest news, and stay updated with new publications. By using the News Portal's functionality, you gain the following features:

  • Publish articles and news: You can add new content by specifying the title, content, category, and tags, making the content creation process convenient and fast 📝
  • Create channels: To organize content efficiently, you can create thematic channels that help structure information and simplify management 📂
  • Filter and sort: With built-in filters by categories, tags, and publication dates, you can easily find the desired material in just a few seconds 🔍
  • Interact with content: The portal provides like functionality, allowing users to express their opinions and engage with published content ❤️
  • Multilingual support: Fully localized in English, Russian, Chinese, and Japanese 🌐

 📸

Technologies 💻

  • Language: Elixir 🧪
  • Database: PostgreSQL 🗄️
  • Libraries:
    • Ecto {3.10} 📚
    • Phoenix {1.7} 📚
    • Tailwind {0.2} 📚
    • ExDoc {0.36} 📚
  • ORM: Ecto 🛠️
  • Templating Engine: HEEx 📝

Installation and Launch 🚀

1. Install Dependencies

Ensure you have the following installed:

  • Elixir (version 1.18.1) 🧪
  • PostgreSQL (version 15) 🗄️
  • Node.js (version 16 or higher) 📦

2. Clone the Repository

git clone https://github.com/adamanq/rednews.git
cd rednews

3. Install Project Dependencies

mix deps.get

4. Set Up the Database

Create the database and configure the connection in the config/dev.exs file:

config :rednews, Rednews.Repo,
  username: "your_db_user",
  password: "your_db_password",
  database: "rednews_dev",
  hostname: "localhost",
  port: 5432,
  pool_size: 10

Create and run migrations:

mix ecto.create
mix ecto.migrate

5. Run the Application

mix phx.server

The application will be available at: http://localhost:4000. 🌐

If You Want to Run in a Container 📦

❗️❗️ Currently, the stability of the application in a container leaves much to be desired, so it is recommended to use the standard build method ❗️❗️

6. Build the Portal Image

docker build .

7. Run the Container Group for the Application and Database

docker-compose up --build

8. Install Project Dependencies

docker-compose exec app mix deps.get

9. Set Up the Database

Create the database and configure the connection in the config/dev.exs file:

config :rednews, Rednews.Repo,
  username: "your_db_user",
  password: "your_db_password",
  database: "rednews_dev",
  hostname: "db",
  port: 5432,
  pool_size: 10

Create and run migrations:

docker-compose exec app mix ecto.create
docker-compose exec app mix ecto.migrate

The application will be available at: http://localhost:4000. 🌐

Usage 📖

  1. Registration and Login: Create an account or log in
  2. Publishing Content: Add an article or news by selecting a category and tags
  3. Filtering and Search: Use filters to find the desired materials
  4. Likes and Comments: Engage with content by expressing your opinion

Project Structure 🗂️

  • lib/rednews — Main application code
    • accounts.ex — Context for working with users and channels 👤
    • posts.ex — Context for working with articles, news, likes, and comments 📝
  • priv/repo/migrations — Database migrations 🗄️
  • assets/ — Frontend resources (CSS, JavaScript) 🎨
  • config/ — Configuration files ⚙️

License 📜

This project is distributed under the MIT License. For more details, see the LICENSE file.

Author 👤

How to Contribute 🤝

If you want to improve the project, follow these steps:

  1. Fork the repository. 🍴
  2. Create a branch for your feature (git checkout -b feature/AmazingFeature) 🌿
  3. Commit your changes (git commit -m 'Add some AmazingFeature') 💾
  4. Push to your fork (git push origin feature/AmazingFeature) 🚀
  5. Create a Pull Request 📥

If you have any questions or suggestions, create an Issue or contact me! 📩

Open Source Love License: MIT Open Source Helpers

Read this in other languages.

Shqip Azərbaycan dili বাংলা Bulgarian Português Català 中文 (Simplified) Czech Deutsch Dansk العربية Española Française Galego Ελληνικά ქართული Magyar Bahasa Indonesia עִברִית हिंदी/ગુજરાતી/मराठी/മലയാളം/ಕನ್ನಡ/తెలుగు/छत्तीसगढ़ी/বাংলা/தமிழ் தமிழ் فارسی Persian_Finglish Italiano 日本語 Kiswahili (Kenya) 한국어 한국어 Lietuvių kalba Limba Română Limba Română မြန်မာ Македонски Español de México Bahasa Melayu / بهاس ملايو‎ / Malay Dutch Norsk नेपाली Wikang Filipino English (Pirate) اردو Polski Português (Portugal) Русский язык عربى Svenska Slovenčina Slovenščina ภาษาไทย Türkçe 中文(Traditional) Українська Tiếng Việt Zulu (South Africa) Afrikaans (South Africa) Igbo (Nigeria) Latvia Suomeksi Беларуская мова Српски Қазақша Bosanski

First Contributions

This project aims to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.

If you're not comfortable with command line, here are tutorials using GUI tools.

fork this repository

If you don't have git on your machine, install it.

Fork this repository

Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.

Clone the repository

clone this repository

Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the copy to clipboard icon.

Open a terminal and run the following git command:

git clone "url you just copied"

where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.

copy URL to clipboard

For example:

git clone https://github.com/this-is-you/first-contributions.git

where this-is-you is your GitHub username. Here you're copying the contents of the first-contributions repository on GitHub to your computer.

Create a branch

Change to the repository directory on your computer (if you are not already there):

cd first-contributions

Now create a branch using the git checkout command:

git checkout -b your-new-branch-name

For example:

git checkout -b add-alonzo-church

(The name of the branch does not need to have the word add in it, but it's a reasonable thing to include because the purpose of this branch is to add your name to a list.)

Make necessary changes and commit those changes

Now open Contributors.md file in a text editor, add your name to it. Don't add it at the beginning or end of the file. Put it anywhere in between. Now, save the file.

git status

If you go to the project directory and execute the command git status, you'll see there are changes.

Add those changes to the branch you just created using the git add command:

git add Contributors.md

Now commit those changes using the git commit command:

git commit -m "Add <your-name> to Contributors list"

replacing <your-name> with your name.

Push changes to GitHub

Push your changes using the command git push:

git push origin <add-your-branch-name>

replacing <add-your-branch-name> with the name of the branch you created earlier.

Submit your changes for review

If you go to your repository on GitHub, you'll see a Compare & pull request button. Click on that button.

create a pull request

Now submit the pull request.

submit pull request

Soon I'll be merging all your changes into the master branch of this project. You will get a notification email once the changes have been merged.

Where to go from here?

Congrats! You just completed the standard fork -> clone -> edit -> pull request workflow that you'll encounter often as a contributor!

Celebrate your contribution and share it with your friends and followers by going to web app.

You could join our slack team in case you need any help or have any questions. Join slack team.

Now let's get you started with contributing to other projects. We've compiled a list of projects with easy issues you can get started on. Check out the list of projects in the web app.

Tutorials Using Other Tools

GitHub Desktop Visual Studio 2017 GitKraken VS Code Sourcetree App IntelliJ IDEA
GitHub Desktop Visual Studio 2017 GitKraken Visual Studio Code Atlassian Sourcetree IntelliJ IDEA
添加内容

About

RedNews is a modern online portal designed for publishing, managing, and organizing news articles 📑

Topics

Resources

License

Security policy

Stars

Watchers

Forks