Skip to content

Cherrypick14/skills_hub

Repository files navigation

skills_hub

Welcome to your new skills_hub project and to the Internet Computer development community. By default, creating a new project adds this README and some template files to your project directory. You can edit these template files to customize your project and to include your own code to speed up the development cycle.

To get started, you might want to explore the project directory structure and the default configuration file. Working with this project in your development environment will not affect any production deployment or identity tokens.

Overview

Skills Hub is an innovative platform designed to manage users, their skills, learning interests, and educational resources on the Internet Computer Protocol (ICP). It aims to foster a collaborative learning environment where users can enhance their skills and knowledge by connecting with peers and sharing valuable resources.

Core Features

User Management

  • Add User: Allows new users to join the platform by providing their skills and learning interests.
  • Update User: Enables users to update their profiles with new skills and interests.
  • Matchmaking: Matches users based on their learning interests and available skills, facilitating peer-to-peer learning and collaboration.

Resource Management

  • Add Resources: Users can contribute learning resources categorized by type, such as articles, videos, or tutorials.
  • Retrieve Resources: Users can easily find relevant learning materials by retrieving resources based on category.

Project Goals

  • Enhance Learning: By connecting users with similar interests and skills, Skills Hub promotes a collaborative and interactive learning environment.
  • Resource Sharing: Encourages the sharing of valuable educational resources to help users improve their knowledge and skills.
  • Scalability and Flexibility: The platform is designed with a flexible architecture to allow for future expansion and integration of new features.

Technologies Used

  • Internet Computer Protocol (ICP): Leveraging the decentralized and scalable capabilities of the ICP.
  • Rust: Utilized for backend development to ensure robust and efficient data handling.
  • Candid Interface: Defines the interaction interface, ensuring seamless communication between the front end and back end.

To learn more before you start working with skills_hub, see the following documentation available online:

If you want to start working on your project right away, you might want to try the following commands:

cd skills_hub/
dfx help
dfx canister --help

Running the project locally

If you want to test your project locally, you can use the following commands:

# Starts the replica, running in the background
dfx start --background

# Deploys your canisters to the replica and generates your candid interface
dfx deploy

Once the job completes, your application will be available at http://localhost:4943?canisterId={asset_canister_id}.

If you have made changes to your backend canister, you can generate a new candid interface with

npm run generate

at any time. This is recommended before starting the frontend development server, and will be run automatically any time you run dfx deploy.

If you are making frontend changes, you can start a development server with

npm start

Which will start a server at http://localhost:8080, proxying API requests to the replica at port 4943.

Note on frontend environment variables

If you are hosting frontend code somewhere without using DFX, you may need to make one of the following adjustments to ensure your project does not fetch the root key in production:

  • setDFX_NETWORK to ic if you are using Webpack
  • use your own preferred method to replace process.env.DFX_NETWORK in the autogenerated declarations
    • Setting canisters -> {asset_canister_id} -> declarations -> env_override to a string in dfx.json will replace process.env.DFX_NETWORK with the string in the autogenerated declarations
  • Write your own createActor constructor

Interacting with the Canister via CLI

You can interact with the Skillhub canister directly from the command line interface (CLI) using the following methods:

-To add a new user to the system:

dfx canister call skill_hub_backend add_user '("user1", vec {"Rust", "JavaScript"}, vec {"Python", "Go"})'

-To find matches for a user based on their learning interests:

dfx canister call skill_hub_backend find_matches '("user1")'

-To add a new learning resource:

dfx canister call skill_hub_backend add_resource '("https://doc.rust-lang.org/book/", "Rust", "user1")'

-To retrieve resources for a specific category:

dfx canister call skill_hub_backend get_resources '("Rust")'

-To update an existing user's profile:

dfx canister call skill_hub_backend update_user '("user1", vec {"Rust", "JavaScript", "Python"}, vec {"Go", "TypeScript"})'

Contributing

I welcome contributions from the community! If you’d like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. See the MIT License file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published