(Import & Export Contacts using .CSV files.)
Contatcts importer challenge is a rails app that allows the user to upload and validate contacts from CSV files, to generate an unified contact file.
This project allows users to create an account, and start importing contacts by processing CSV files.
David Orejuela Software Developer |
---|
ย |
This software is a 1-week challenge created to test our technical knowledge using Ruby on Rails.
If we are not logged into the app then we can see all the most recent tweets from all the users and have the option to log in or sign up:
- You can sign in with the E-mail & password
- You can sign up to create a new account
Once you are signed in, can import the CSV file, match the headers to know what data you want to process, see the list of imported contacts and contacts with errors, and check the state of each file that has been put throug processing.
Contact Importer was created using Ruby on Rails, additionals gems used to simplify the logic were used:
Gem | Utility |
---|---|
Devise | Simplifies user handling logic |
Sidekiq | Allows to easily run background process so big CSV files doesn't take down the app |
pagy | Simplifies loading objects into the view with a pagination logic |
aws-sdk-s3 | Makes it easy to connect with an Amazon S3 Bucket |
credit_card_validations | To have re-usable structure to check for credit cards information |
- Ubuntu 18.04+
- Ruby 2.7+
- Rails 6+
- Postgres 1.8+
- Redis 3.0+
- Sidekiq 5.4+
Please make sure that you have installed the essentials and rails 6+ before cloning:
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel redis-server
- Clone the repository:
git clone https://github.com/daorejuela1/contact-importer
- Go to the folder:
cd contact-importer
- Install requirements
bundle
- Create the data base
rails db:create
- Run the migrations
rails db:migrate
- Start the redis-server
redis-server
- Start the Sidekiq server
bundle exec sidekiq
- Run the server:
rails s -b 0.0.0.0 -p 3000
Get into the URL 127.0.0.1:3000
to start the app, and sign up with a new account to start loading contacts.
Use one of the files inside the csv_test folder to start uploading contacts or create a new csv file taking in account that the fields must have these rules
Key | Rule |
---|---|
Name | Can contain any alphanumeric value |
Birthday | Must be valid only (%Y%m%d) & (%Y-%m-%d) formats are accepted |
Phone number | Only (+00) 000-000-00-00 & (+00) 000 000 00 00 formats are accepted |
Address | Just can't be Empty |
Credit card | Can contain any alphanumeric value, length & issuer have to be valid |
Only accepted format [characters]@[characters].[characters] |
- All fields are mandatory If you want to debug your CSV file, after uploading it, you can download it again from the CSV Imported files and check the added column to get the error information asociated with each contact.
- You can manually select which fields of your CSV file you want to process
- You can upload your CSV file to our server for future processing
- You can check the error asocciated with importing each contact
- You can export a list with all the valid contacts in the app
- You can check the state of each file you want to process
- You can download the file with an added column to analyze why the error ocurred
To check the live software clic here
Here are some awesome projects I have been working on:
Mastermind Hackday Project | Daily tweet | Monty bytecode decoder | Serpent Algorithm | Custom Shell v2 |
---|---|---|---|---|
- Fix bug to implement Devise with Hotwire
Special thanks to koombea.com for letting me be part of this awesome challenge.