Morselo - the daily code excerpts for the developers. Collect & organize code, snippets and notes. Manage and share your snippets with ease.
For starting local development,
Cloning the project
git clone git@github.com:team-underground/morselo-server.git
cd to the project and run:
composer install
copy env file
cp .env.example .env
Setup database credential and run
php artisan migrate
Install passport keys
php artisan passport:install
get the client id and secret and put them in the .env file
PASSPORT_CLIENT_ID=2
PASSPORT_CLIENT_SECRET=tsN2IOJ0kgA7yxPNxPvnZ5j1LAmYJUbVMpwqNJGp
create a github oauth app for login using github
. Provide Authorization callback URL as https://${SERVER_BASE_URL}/login/github/callback
.
get the client id and secret and put them in the .env file
GITHUB_CLIENT_ID=61e48aa8c7479b9ae45a
GITHUB_CLIENT_SECRET=c0e3e758efd4ddf9580e16170400695fb2e0fe32
If you find any error like
Key path "file:///app/storage/oauth-public.key" does not exist or is not readable
. Please try this below options:
-
- Generating the passport keys forcefully
php artisan passport:keys --force
-
- Try clearing all the config and app caches
php artisan config:clear
php artisan cache:clear
-
- If these above steps does not work, then generate
public outh key
andprivate oauth key
manually.
- If these above steps does not work, then generate
openssl genrsa -out storage/oauth-private.key 4096
openssl rsa -in storage/oauth-private.key -pubout > storage/oauth-public.key
-
- If the problem is not resolved yet, then copy the contents of
public outh key
andprivate oauth key
to env:
- If the problem is not resolved yet, then copy the contents of
PASSPORT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
MIIJKwIBAAKCAgEA3lxCjoyZBg4prZE5qy64KPvIHwgEx+vFdh3il4RFzmmH/+y3
zOhJyPR4+1VK+uk0fEcIKT1sa9WYMkkx2g54QOxoomz/tn3YNDS0c4DJwiCcWxAx
Sp8T9h+s99kS9fIQirOViIcGdpfQT4IuSqSKztepRWq9IJfVgQH7TcrbDq+Z2q3e
vnSc3Pggrw8w9ZweI7Gkp5Ci8U4hNiCKR1TVNtAHYmBMC8SEvmiaqtPMyKEaoIXm
ybn7cSgJueROiFVYIKLrmjvORNN0WbUi08rmm4FeQFAlaGQ5YeDR+oV0diFioY8i
LAqd11OYsu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WbUi08rm
m4FeQFAlaGQ5YeDR+oV0diFioY8iLAqd11OYsuNfu6GamyvGli8k4CfayaVKsBCl
p3Tefw+9Aza1lfHqPyyDPhxd3xIpFqZXGds/Mb71bZC9kMMssMWwJ3vXWBh1Kjyn
YOayJE6x2fjuKyyu15x/0mkprKTPxTa1K8fZU2quzuj0juoM32bPnFqUf5VjstNr
qtTTSvVx0s9evGn6JRwV4H6nbsZde4FGc5FnCYeuJ3/ixwzrMv+YXQa7DL4c5wnG
GgSr9yXBQrn/YBO1FcLDAtQFDg1bMULm5JcuD8rSMDVNdQD+Cc2KmqZoqGyhLSq5
PCFzdxc/VQ3iUJ5qvOlYx5LetbP6tPhySupLVy8tqp9ujyz3IeKB67motK3Tt91J
/zm3Pm0VVnMVk9QRJkrT/ysCAwEAAQ==
-----END PUBLIC KEY-----"
Now, clearing the cache will work fine.
Morselo is still under heavy development, We decided to ship it in this early stage so you can help us make it better.
Here's the plan for what's coming:
- Social login via Github
- Feeds of latest snippet
- Lists all tags (categories) in categories page
- Tag wise feed listing
- Admin - create snippet
- Admin - edit snippet
- Dev can like, bookmark snippets if logged in
- List bookmarks and dev's snippets
- Unit Test
- Search by title implemented
- Public search page using algolia
- Social login via Twitter
- snippets can be make public and private
- private snippets will not come in public search or feeds
- follower and following concept
- allow devs to store snippets as gists in github (exceptions to be handled when login using twitter)
- many more to come...
coming soon...
Morselo is open-sourced software licensed under the MIT license.