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 🌐
- Language: Elixir 🧪
- Database: PostgreSQL 🗄️
- Libraries:
- Ecto {3.10} 📚
- Phoenix {1.7} 📚
- Tailwind {0.2} 📚
- ExDoc {0.36} 📚
- ORM: Ecto 🛠️
- Templating Engine: HEEx 📝
Ensure you have the following installed:
- Elixir (version 1.18.1) 🧪
- PostgreSQL (version 15) 🗄️
- Node.js (version 16 or higher) 📦
git clone https://github.com/adamanq/rednews.git
cd rednews
mix deps.get
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
mix phx.server
The application will be available at: http://localhost:4000. 🌐
❗️❗️ Currently, the stability of the application in a container leaves much to be desired, so it is recommended to use the standard build method ❗️❗️
docker build .
docker-compose up --build
docker-compose exec app mix deps.get
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. 🌐
- Registration and Login: Create an account or log in
- Publishing Content: Add an article or news by selecting a category and tags
- Filtering and Search: Use filters to find the desired materials
- Likes and Comments: Engage with content by expressing your opinion
- 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 ⚙️
This project is distributed under the MIT License. For more details, see the LICENSE file.
- Adamanr 🧑💻
If you want to improve the project, follow these steps:
- Fork the repository. 🍴
- Create a branch for your feature (
git checkout -b feature/AmazingFeature
) 🌿 - Commit your changes (
git commit -m 'Add some AmazingFeature'
) 💾 - Push to your fork (
git push origin feature/AmazingFeature
) 🚀 - Create a Pull Request 📥
If you have any questions or suggestions, create an Issue or contact me! 📩
Read this in other languages.
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.
If you don't have git on your machine, install it.
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.
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.
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.
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.)
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.
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 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.
If you go to your repository on GitHub, you'll see a Compare & pull request
button. Click on that button.
Now submit the 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.
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.
GitHub Desktop | Visual Studio 2017 | GitKraken | Visual Studio Code | Atlassian Sourcetree | IntelliJ IDEA |
添加内容 |