Heroku link - https://nxtfolio.herokuapp.com
Taiga Tracker link - https://tree.taiga.io/project/honraoyash-fashionxt-nxtfolio/timeline
- Setup and Testing:
- How to Deploy :
- Using AWS S3 as Image Backend
- Country/States/Cities Database
- Geocoding
- What will you see on the web app?
- To get started
- Home Page Features
- Search Features
- Rating Featues
- Forgot Password Feature:
- Job Feature:
- Tag features:
- Travel features:
- Gallery features:
- CRM API:
- Contact:
Go to config/environments/test.rb
and set config.use_remote_webdriver
to true if using docker-compose, and to false otherwise.
This is the fastest way to get started. It uses docker-compose to set up two containers
- ruby: container with the app and in which you will be developing
- browser: container with selenium web driver needed for testing with cucumber
The files to setup docker-compose can be found in the install
folder.
-
If you are using M1 chip, change in
docker-compose.yml
thebrowser
image toimage: seleniarm/standalone-firefox
-
Clone the repository
git clone https://github.com/omarkhater-school/NXTFolio.git --config core.autocrlf=input
-
Go into the
install
foldercd install
-
Build and start the containers for docker-compose (-d used to do start in detach mode)
docker-compose up -d
The project folder has been binded to
/home/match-my-fashion-public-CodeCreators
. In other words, it is shared by the container and host so it you can continue developing in your host machine. -
Run a bash terminal on the ruby container
docker-compose exec ruby bash
-
Copy the setup script and cd to home
cd /home cp match-my-fashion-public-CodeCreators/install/setup.sh . sudo chmod +x setup.sh
-
Run
setup.sh
script and follow the instructions (more details about what it does can be found ininstall/setup.sh
)source setup.sh
If you run into trouble, try looking the script since the comments might help.
-
You should be set. Whenever you want to run the server just run
rails server -b 0.0.0.0 -p 3000
-
To connect to the website go to:
When you are done developing, you can stop the docker-compose
cd install
docker-compose stop
The next time you want to connect you just have to run the following:
cd install
docker-compose start
or start the docker-compose from the desktop app.
In the root directory, run "rails cucumber"
When running cucumber tests (rails cucumber
), you can access the following website to see what the tests are doing
http://localhost:7900/?autoconnect=1&resize=scale&password=secret
This combined with the cucumber step When I debug
is a powerful tool to debug the cucumber tests.
- Capybara Timeout issue : Go to /install -> docker-compose down -> docker-compose up -d -> run setup steps from step 4 above.
This is the fastest way to get started.
The Dockerfile and script to automatically setup app can be found in the install
folder.
-
Clone the repository
git clone https://github.com/vibalcam/match-my-fashion-public-CodeCreators --config core.autocrlf=input
-
Build the Dockerfile using
docker build -t ruby-ssh install/
-
Run docker container
If using Windows:
docker run -d -p 8080:3000 --mount type=bind,src="%cd%",target=/home/match-my-fashion-public-CodeCreators --name test_container ruby-ssh
If using Linux:
docker run -d -p 8080:3000 --mount type=bind,src="$(pwd)",target=/home/match-my-fashion-public-CodeCreators --name test_container ruby-ssh
We are mapping port 3000 (used by rails server) to 8080 in the host.
We are also binding the project folder to
/home/match-my-fashion-public-CodeCreators
so it is shared by the container and host. -
Connect to terminal in container
docker exec -it test_container bash
-
Copy the setup script and cd to home
cd /home cp match-my-fashion-public-CodeCreators/install/setup.sh setup.sh sudo chmod +x setup.sh
-
Run
setup.sh
script and follow the instructions (more details about what it does can be found ininstall/setup.sh
)source setup.sh
If you run into trouble, try looking the script since the comments might help
-
Generate database:
rails db:migrate rails db:seed
-
You should be set. Whenever you want to run the server just run
rails server -b 0.0.0.0 -p 3000
-
Execute tests as follows:
bundle exec rails bundle exec cucumber
-
To connect to the website go to:
[http://localhost:8080](http://localhost:8080)
-
Copy
install/setup.sh
to folder where you want to download the app -
Give permission to run the script
sudo chmod +x setup.sh
-
Run
setup.sh
script (more details about what it does can be found ininstall/setup.sh
)If you have already cloned the repo:
./setup.sh
If you have just copied the script:
./setup.sh https://github.com/vibalcam/match-my-fashion-public-CodeCreators
If you run into trouble, try looking the script since the comments might help
-
You should be set. Whenever you want to run the server just run
rails server -b 0.0.0.0 -p 3000
-
To connect to the website go to:
[http://localhost:8080](http://localhost:8080)
-
Changes to css or javascript not reflecting on test
Try recompiling the assets by running
rake assets:clobber
andrake assets:precompile
. -
env: ruby\r: No such file or directory
Windows uses a different line ending to linux, which is makes linux not read correctly windows files. Use
git clone url --config core.autocrlf=input
ordos2unix
linux package to fix. -
error: Homebrew on Linux is not supported on ARM processors
Problem with M1 chip macOS - brew not available for arm64 processor. Use platform option in docker build and run commands.
docker build --platform linux/amd64 -t ruby-ssh install/ docker run -d -p 8080:3000 --platform linux/amd64 --mount type=bind,src="$(pwd)",target=/home/match-my-fashion-public-CodeCreators --name nxtfolio ruby-ssh
-
error: brew not found
Make sure to run the steps which are displayed in console after installing brew.
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.profile eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
-
Error: Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
First go to the setup script and try to run all the postgres related commands
sudo apt install -y postgresql postgresql-contrib libpq-dev -y
If an error occurs involving the "dpkg is locked" then there are other processes trying to use apt. You need to kill these processes
To get a list of processes using apt run the follow command
ps aux | grep -i apt
Hopefully it will show that some other processes are trying to use apt, kill these processes by running
sudo kill <process_id>
Once the processes are killed try installing postgres again using the lines specified in the setup script.
- heroku create -a [appname]
- heroku config:set AWS_ACCESS_KEY=AKIAV5IDIKICCNPVFZ3U
- heroku config:set AWS_BUCKET=nxtfolio-s3
- heroku config:set AWS_REGION=us-west-2
- heroku config:set AWS_SECRET_KEY=/q8xUNLrsVtMOmE+h2UsyKjjJyQA04PcIQcz+f22
- heroku addons:create heroku-postgresql:essential-2
- git push heroku master
- heroku run rails db:migrate
- heroku run rails db:seed
If you wish to use the S3 image backend (allowing images to be saved for more than 2 days), you will need to create an S3 bucket(AWS_BUCKET). You will then need to set AWS_BUCKET, AWS_SECRET_KEY , AWS_ACCESS_KEY and AWS_REGION so that Rails can find that bucket. For local environments:
AWS_SECRET_KEY=x AWS_ACCESS_KEY=y rails server
where x
and y
are replaced by your account details from Amazon Web Services
For deployed Heroku environments: (assuming the site is already deployed)
heroku config:set AWS_SECRET_KEY=x
and then heroku config:set AWS_ACCESS_KEY=y
To update the country/state/city database visit countries-states-cities-database to obtain the latest json file and replace it for the one located at db/seed_files/countries+states+cities.json
.
Then run
rake db:reset_countries
For searching by location, a Google Geocoding API key will be required. This must be set as an environment variable (see Using AWS S3... above) with the name "GOOGLE_KEY".
Once this key is set, it is necessary to run "rake geocode:all CLASS=GeneralInfo" to populate the gecoded fields. For Heroku environments, prepend the previous command with "heroku run".
- Home page with project view
- Login/Signup, Search
- My Profile
- Rating/ Review feature on application
- Admin user has been added, with privilege for using the admin APIs. This is only available to the single admin user, added by the developer. Contact admin for help
- Direct Messaging (DM) and Notification feature on Profile Details page.
- forgot Password option in the Sign In Page.
- Search with keywords matching for profile’s name, bio, compensation type, and highlights. And filtering by country, state, city, and professions.
- Search results will be sorted by a logic based on rating, gallery numbers, names and location.
- Add/delete individual images in the gallery, also tag collaborate contributors to a gallery.
- Add travel information to users.
- Mobile view of each page.
- Click on sign up and create your profile in 3 quick steps.
- Once your profile is created, you will be shown logged in to the account
- Click on my profile page, to see your profile information.
- If you want to edit your profile, you can click on the three main links available on the edit profile page. You can find two options, “Edit Personal Info” and “Edit Professional Info”. You can edit your profile according to your preferences
- Social Media handles are shown in the profile details page,
- You can add projects and upload up to 5 photos to the project. You can view the average project rating of your project. If you are the creator of the project, you will be able to find a link to creating the project.
- Home page will show the list of the projects based on current user’s city, state, and country.
- Buttons of Home page are updated and professional can see the projects filtered by specific professions.
- The professionals can see both the profile details and project details page link from the home page.
- The users can search directly from Home page now.
- The user can search from home page directly.
- The user can search with keywords matching for profile’s name, bio, compensation type, and highlights. And filtering by country, state, city, and professions.
- The search results will be sorted by a logic based on rating, gallery numbers, names and location.
- The users can also find travelling profiles during their travelling time.
- If there are no results for a search, the recommending profiles based on user’s location will be listed.
- The user can add star ratings from the profile page now in (1 to 5 scale).
- To rate another professional, the user has to be signed in.
- One can add only one rating to a project and edit their rating after that. A professional cannot rate their own project.
- The user can request a password reset in their registered email address.
- A temporary link (validity: 15 minutes) has been generated for the resetting password
- After resetting, they will be redirected to the sign in page again.
- The user can go to the pages to post jobs, edit jobs, and delete jobs.
- There is a separate search engine in which users can search for matching jobs.
- User can tag users in project to show that they work together to do a project.
- User can invite users to collaborate by sending email to others, and then the invitor can edit it directly from the link in project.
- User can add travel info in their profile.
- Travelling user will show up in search results.
- The user can add and delete gallery in their profile page.
- The user can add/delete individual images in their gallery. (no more than 5)
- The user can edit their text info in a gallery.
For Deployed App:
- Update the 'OPEN_AI_API_KEY' on Heroku website => Settings => Config Vars
- In chat_service.rb, use the line: $@openaiClient = OpenAI::Client.new(access_token: ENV["OPEN_AI_API_KEY"],
For Running Locally:
- Set up local key on Terminal: $EDITOR="nano" bundle exec rails credentials:edit
- Add the line in the nano editor: $open_ai_api_key: YOUR-API-KEY
- In chat_service.rb, use the line: $@openaiClient = OpenAI::Client.new(access_token: Rails.application.credentials.open_ai_api_key,
- Developing an algorithm for recommending Profile, Projects, and Jobs
- An algorithm can be developed for displaying projects and profiles that are based on the user’s history or interest. Likewise, Jobs can also be recommended.
- Fixing bugs and displaying the availability of a user based on the Travel dates
- Tuning the Collaborator Comment Feature into a points based system
- Introducing a new points/rating based system where users are not only given comment access based on their taggings/collaborations. They are given access when the number of points cross a certain threshold like 80.
- Mobile View
- Reverse Image Search
- Open the CRM either locally or on heroku
- Login as admin (default admin information is in seed.rb)
- Go to application management
- Click the new applicaiton button
- In the API URL add the home link of NXTFolio and then add /api/user to the end of it for example "https://nxtfolio.herokuapp.com/api/users
- Fill in the callback and the home page with the same values
- The other fields are self explanatory
- From here NXTFolio should be available on the left side menu to see the statistics
Contact for most recent team (Fall 24)
- Likhith Majjigapu: [email protected]
- Manikanta Gudipudi: [email protected]
- Omar Khater: [email protected]
- Venkat Pitta: [email protected]
- Yash Honrao: [email protected]
- Caroline Li: [email protected]
- Brandon Hill: [email protected]
Contact previous teams for testing, deployment and issues related to following features :
- AI Chatbot -> [email protected]
- Collaborator Commenting -> [email protected], [email protected]
- Job Posting -> [email protected]
- CRM -> [email protected]
- General -> [email protected]