Coder Social home page Coder Social logo

chatui-ios's Introduction

Chat Interface iOS App

Project Overview:

This project is an iOS application aimed at creating a chat interface. The application allows users to exchange messages in a chat interface that follows specific rules and requirements outlined below.

The app has been developed using Swift and SwiftUI.

Demo app short video: https://we.tl/t-VqbmEhl1kU

Project Structure:

The project follows clean architecture concept:

  • Scenes: Contains modules related to different scenes of the application.
    • View: Contains SwiftUI views for the chat interface.
    • ViewModel: Holds the business logic and data for the chat interface.
    • Repository: Handles data access and storage operations.
    • UseCase: Contains the core functionality of the application, such as sending and loading messages.
    • Model: Defines data models used throughout the application.
  • Services: Contains external services utilized by the application (Realm).
    • Persistence: Handles data persistence using technologies (Realm).
      • Database: Includes database management utilities.
      • Repository: Implements data repository interfaces for accessing persistent data.
  • Utils: Contains utility functions and extensions used across the application.
    • Extensions: Includes extensions for built-in Swift types, such as Date extensions.

Functionality:

The application implements the following features and functionalities in compliance with the provided rules:

  • Chat UI pages in the opposite direction, with older messages displayed when reaching the top of the scroll view.
  • Messages are added to the chat interface upon sending.
  • Sent and received messages are visually distinguished by aligning them left or right, respectively.
  • Messages are encased in a bubble, adhering to the provided screenshot reference.
  • Messages are grouped based on specific criteria:
    • Messages separated by more than an hour are sectioned with the date and time.
    • Messages from the same user sent within 20 seconds of each other have smaller vertical spacing, appearing grouped together.
  • Message persistence is implemented using Realm.

Assumptions and Decisions:

In the implementation of this project, the following assumptions and decisions were made:

  • UI Implementation: The user interface was designed to closely resemble the provided screenshots while ensuring responsiveness and usability.
  • Architecture: The project follows a modular architecture pattern, separating concerns and promoting maintainability.
  • Data Persistence: Realm was chosen for message persistence and solution for storing chat data.
  • Testing: An example of unit tests is included

Improvments and ToDo's:

  • Dependency injection (DI) Consider to use third party libraries for DI such as Swinject
  • Message view model Improve the view model
  • UI and usabilityl Improve the chat view with better animations and usability
  • Unit testing Add coverage 80%

Franco Driansetti

chatui-ios's People

Contributors

francodriansetti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.