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 ❤️
- 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! 📩